Skip to content

Workshop: Intro JavaScript

  1. Use the command line to see if you have Node.js installed, using node --version. If you don’t have it, install it from the website.

  2. Create a file named intro.js and save it in a folder where you can run it with the node command, like node intro.js.

  3. Write some JavaScript that creates an ASCII art checker pattern in your terminal. Dark squares can be represented with a # or and white squares with a space or .

  4. Create variables with values of three different data types and log the type of each one to the console.

  5. Create at least two number variables and log them to the console.

  6. Create a string variable that contains quotation marks and log it.

  7. Create a string variable that contains backslashes that show up when logged to the console, and log it.

Content CC BY 4.0 | Code AGPL 3.0