Basics-01
Get to your submission folder under exercises/javascript-basics-01
Each step has a prepared html file to work with, use it
You should create a javascript file for each step with the name of the step.
e.g : Step_1.html + Step_1.js
COMMIT AFTER EACH STEP, call each commit by the name of the step
References
Goals:
Learn general basic programming syntax as applied to Javascript
Competencies:
variables
strings
simple maths
if, else
Step 1 : Variables
Define a variable, "name"
Show this variable in an alert box
Commit
Step 2 : Variables 2
Define three variables:
name
,surname
andcity
.Commit!
Step 3 : Strings concatenation
Show a dialog box asking the user for his name
Show an alert box saying "Hello, ", then the name provided
Commit!
Step 4 : Strings concatenation 2
Just like Step 3, but ask for name, surname, and city (Step 2 + Step 3)
Commit
Step 5 : Simple Math
Ask for the user for two numbers
Multiply them
Show the result to the user
Commit
Step 6 : External files and Simple Math
Create a separate javascript file
Include it in the html
Have the user provide two numbers
Divide them
Show the user the remainder of the division
Commit
Step 7 : Multiple operations
In an external file:
Ask the user for his shoe size and his birth year
Create a function that:
Multiplies the shoe size by 2
Adds 5
Multiplies by 50
Subtracts the birth year
Adds 1766
Shows the result to the user
Commit
Step 8 : if, else
Ask the user for their age
If the user is over 18, show "you are over 18", else, show them "you are under 18"
Commit
Congrats!
You finished Javascript Basics 1! Send a pull request.
Last updated
Was this helpful?