Declaring (Creating) JavaScript Variables
Use a single var keyword to create three variables with the following values
Display the sum of 5 + 10 using two variables x and y.
Display the difference of 10 - 5 using two variables x and y.
Use the Multiplication (*) operator to display multiplication of 2 numbers
Display the result of 10 / 5 using two variables x and y.
Find the remainder when 15 is divided by 9 using two variables x and y.
Use the += operator to add a value of 5 to the variable x.
Use the -= operator to subtract a value of 5 from the variable x.
Use the *= operator to multiply the variable x with 5.
Use the /= operator to divide the variable x with 5.
Use the %= operator to assign a remainder of 10 / 3 to the variable x.
Using += operator to concatenate String
Figure out what is wrong with the function - fix it and run it as it should!
Use the function to display the product of 5 * 5.
Use the function to display "Hello John".
Define a function named "myFunction" and make it display "Hello World!" in the <p> element.
Display "John" by extracting information from the person object.
Add the following property and value to the person object: country: USA
Create an object called person with name = John age = 50. Then access the object to display "John
The <p> element should do something when someone clicks on it. Try to fix it!
When the button is clicked trigger myFunction() with an event.
Assign the string "Hello World!" to the variable txt.
Use the length property to display the length of the txt variable's value.
The string below is broken - use escape characters to display the text correctly.
Display the position of the first occurrence of "World" in the variable txt.
Use the slice() method to display only "BananaKiwi".
Use the replace() method to replace "World" with "Universe".
Convert the value of txt to lower case.
Convert the value of txt to upper case.
Use the concat() method to join the two strings: str1 and str2.
Create a variable called myNumber assign the value 50 to it and display it.
The value of z should be 11. Find out what's wrong and fix it.
Use the random() method to display a random number.
Fix the code to display the number with the highest value.
Round "7.3" to the nearest integer and display it.
Display the square root of "9".
Create a Date object to display the date and time for 1st January 2017.
Create an array named cars assign the values "Saab" "Volvo" and "BMW" to it and display it.
Display the "Volvo" item of the cars array.
Change the first item of cars to "Opel" by referring to the index numberand display the whole array
Use the length property to display the number of array items in cars.
Use the length property to add a new item to cars: Mercedes.
Use the pop() method to remove the last item from the fruits array.
Use the push() method to add a new item to fruits: Kiwi.
Use the splice() method to remove "Orange" and "Apple" from fruits.
Use the concat() method to concatenate girls and boys.
Use the sort() method to sort the array alphabetically.
Choose the correct comparison operator to display "true" when: 5 is less than 7.
Choose the correct comparison operator to display "true" when: 10 is greater than 7.
Choose the correct comparison operator to display "true" when: 10 is equal to 10.
Choose the correct comparison operator to display "true" when: 10 is NOT equal to 8.
Use the if statement to output some text if 5 is greater than 2.
1. Write an if statement with the following condition: 10 is greater than 5. 2.
Change the value of the variable firstName to make the if statement run.
Add an else statement to display "You're not John!".
Write an if/else statement with the following condition
The if/else statement does not work. Try to fix it.
Switch - The switch statement is missing a case for "Apple".
Switch - The switch statement is missing a default case.
Switch - The switch statement does not work. Try to fix it.
For Loop - In the for loop change num1 to 0 and num2 to 10 and run the code.
For Loop - Make the loop start counting from 5 instead of 0:
Make the loop start counting from 5. Count up to (including) 50 and count only every fifth number.
For loop - Make the loop start counting downwards from 10 and stop at 1.
For Loop - Inside the for loop!
For Loop - In this exercise you are going to create a for loop from scratch
While Loop - Inside the <script> element; change num1 to 0 and num2 to 10 and run the code.
While Loop - Make the loop start counting from 5 instead of 0:
Make the loop start counting from 5. Count up to (including) 50 and count only every fifth number.
While Loop - Make the loop start counting downwards from 10 and stop at 1.
Do/While - The do/while loop should output 0 1 2 3 4. Try to fix it!
DOM - Properties and Methods
Use the innerHTML property to change the content of the <p> element to "New text!".
Use the HTML DOM to set the text color of <p> to "red".
Use the HTML DOM to add a yellow background color to <p>.
Use the HTML DOM to center-align the text of <p>.
Use the HTML DOM to change the text size of <p> to 40 pixels.
Use the HTML DOM to hide the <p> element.
Get the HTML skeleton in Place!
Let's start the game right...
Let's mix up the things randomize it
It's time to respond with an answer - Selection
I Love the game - Let's Play it again!
Let's make it fun - Add some Animations and wrap up!
let and const Binding Scope
let and const Bindings in Loop
let and const in Global Scope
Default Parameters in Functions
Expressions as Default Parameters in Functions
Rest Parameters in Functions