/find-open-restaurants

Here is Full-Stack Intern Take-Home Assignment. It shows open restaurants at selected hour and day in the CSV file.

Primary LanguageJavaScript

Burak Sürmen

Quality Gate Status
Here is Full-Stack Intern Take-Home Assignment.

Search for open restaurants according to day and hour. First, drag or click to upload CSV file of restaurants. If you don't have it, you can easily download it. Then, choose your day and hour to see open restaurants at that time!

Total assignment took around 3-4 days including searching how to work with CSV, creating JavaScript algoritm, transforming to React, adding styles and some more functionality.

Solution

  • Parsed CSV to JSON to be able to work on it.
  • Splited the row into 2 pieces as name and times.
  • Splited days and opening hours to identify its value.
  • Splited times into multi pieces according to slash to have different ranges.
  • Converted days into date value. ex.0
  • Converted open & close hours into minutes to have easier calculation.
  • Created time object including day, start and end value.
  • Compared selected date and hour with processed data.

This was a great assignment to praticeh how to work with:

  • Different file formats
  • Regex, split, match, etc.
  • Algoritm
  • Date objects
  • Parsing data
  • Iteration, array

Live link: burak-home-assignment

Screenshots

Screenshot of Homepage

Contact

Created by @bsurmen - feel free to contact me!