Javascript Assignments

      Task 1:
    1. Declare a variable named number0 and give it any numeric value
    2. Print the type of number0 on console. hint: use typeof( ) to get the type 
    3. Declare a variable named number1 and give it any numeric value greater than number0
    4. Print the type of number1 on console. hint: use typeof( ) to get the type 
    5. Print the sum of the two variables(number0 and number1) in console by using console.log( )
    6. Print the difference of the two variables(number0 and number1) in console by using console.log( )
    7. Print the product of the two variables(number0 and number1) in console by using console.log( )
    8. Divide the numbers(number0 and number1) and print the result in the console by using console.log( )
    9. Print the remainder when number0 is divided by number1 in console by using console.log( )


                Task 2: 
    1. Declare a variable named number0 and give it any numeric value
    2. Declare a variable named number1 and give it any numeric value 
    3. If number0 is divisible by number1, then print "Divisible" on the console, otherwise print "Not divisible"
    4. If number0 is equal to or less than number1, then print "number0 >= number1" on the console otherwise print "number0<number1" on the console.
                    
                Task 3: 
    1. Declare a variable named string0 and give it any string value e.g. var string0 = "Good";
    2. Print the type of string0 on console. hint: use typeof( ) to get the type 
    3. Declare a variable named string1 and give it any string value e.g. var string1 = "morning";
    4. Print the type of string1 on console. hint: use typeof( ) to get the type 
    5. Declare a variable named addedString and assign the concatenation of string0 and string1 to it.
    6. Print the value of addedString on the console.

Comments