/neon

neon themed interview code test

Primary LanguageJavaScriptISC LicenseISC

NEON

Neon themed javascript problem :)

The Problem

We are opening a food stall and we need a NEON sign to attract customers.

Our product people came up with a few requirements that should do the trick:

  • upper case letters
  • an emoji on each end
  • the sign should light up from top to bottom, one section every half a second

We also decided to use the neon.js framework to do some of the heavy lifting.

Unfortunately they haven't decided on what type of food we will be selling, so we need to keep it flexible.

Example:

displaySign('🍕','pizza');
┏──┓
│🍕│
│P │
│ I│
│Z │
│ Z│
│A │
│🍕│
┗──┛

Start

Edit this file index.js by adding the required code in the // ... comment blocks.

To run open the terminal and use this command:

npm run start

Topics covered

  • closures and scope
  • == VS ===
  • var VS let
  • arrow functions () => {}
  • produce readable code
  • shows that can find docs toUpperCase