Repository files navigation JavaScript Basics 1 - Variables, Functions, and Branching
Define a variable, "name"
Show this variable in an alert box
Commit
Define three variables: name, surname and city.
Show them like in the image
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!
Just like Step 3, but ask for name, surname, and city (Step 2 + Step 3)
Commit
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 show 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
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
You can’t perform that action at this time.