Javascript Assignments
- Declare a variable named number0 and give it any numeric value
- Print the type of number0 on console. hint: use typeof( ) to get the type
- Declare a variable named number1 and give it any numeric value greater than number0
- Print the type of number1 on console. hint: use typeof( ) to get the type
- Print the sum of the two variables(number0 and number1) in console by using console.log( )
- Print the difference of the two variables(number0 and number1) in console by using console.log( )
- Print the product of the two variables(number0 and number1) in console by using console.log( )
- Divide the numbers(number0 and number1) and print the result in the console by using console.log( )
- Print the remainder when number0 is divided by number1 in console by using console.log( )
- Declare a variable named number0 and give it any numeric value
- Declare a variable named number1 and give it any numeric value
- If number0 is divisible by number1, then print "Divisible" on the console, otherwise print "Not divisible"
- If number0 is equal to or less than number1, then print "number0 >= number1" on the console otherwise print "number0<number1" on the console.
- Declare a variable named string0 and give it any string value e.g. var string0 = "Good";
- Print the type of string0 on console. hint: use typeof( ) to get the type
- Declare a variable named string1 and give it any string value e.g. var string1 = "morning";
- Print the type of string1 on console. hint: use typeof( ) to get the type
- Declare a variable named addedString and assign the concatenation of string0 and string1 to it.
- Print the value of addedString on the console.
- Task 1:
Task 2:
Task 3:
Comments
Post a Comment