/THP_S7_J4_simpleJS

Basic JavaScript algorithms exercises.

Primary LanguageJavaScript

THP (Week 7 Day 4): JavaScript exercises

Files:

  • a simple index.html calling one script at once
  • up to 7 different scripts

Scripts description:

  • script_1.js : puts "Bonjour, monde !" ("Hello, world!" in french) in the console, asks to input a nickname and puts it into the console within a sentence
  • script_2.js : asks the user through a prompt box to input an integer to calculate it's own factorial, also puts that question in the console and proceed by giving the result into the console within a sentence
  • script_3.js : console output + box prompt asking "how many floors are required", and proceeds by building into the console a "Mario-like" pyramid made of "#" with the required number of floors.
  • script_4.js : 9 different exercises on arrays/hashes. Descriptions within the file (in french, sorry!)
  • script_5.js : 5 different exercises on arrays/hashes. Descriptions within the file.
  • script_6.js : 4 different exercises on arrays/hashes. Descriptions within the file.
  • script_7.js : 5 different exercises on arrays/hashes. Descriptions within the file.

How to:

As asked in the initial wording, you will have to :

  • download this repo, either from a .zip file or by cloning it
  • open your browser (any should work, but a dev friendly one like Firefox or Chrome is suggested)
  • edit index.html with any text editor and change "script_x.js" 's number within the 1-7 range to match the required script
  • open index.html in your browser
  • open your console within the dev inspector/tools (CTRL + SHIFT + K for Firefox ; CTRL + SHIFT + J for Chrome)
  • test a script !