0% found this document useful (0 votes)
9 views

Js Assignment

Uploaded by

Lakhan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Js Assignment

Uploaded by

Lakhan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

• Declare variables using var, let, and const and differentiate between them with

eg.
• Demonstrate the use of different data types (string, number, Boolean, null,
undefined, NaN).
• Perform arithmetic operations (addition, subtraction, multiplication, division ,
AND, OR , NOT operators).
• Use assignment operators (=, +=, -=,).
• Use comparison operators (==, ===, !=, !==, ," ").
• Write an if...else statement to check if a number is positive, negative, or
zero. so same with switch cases.
• Use a for loop to print the first 10 numbers of the Fibonacci sequence.
• Create a while loop that prints numbers from 15 to 7 in decreasing order.
• Define a function that takes two numbers as arguments and returns their mean.
• Create a function that takes a string and returns it in reverse without google
• Write a function that checks if a given number is prime.

You might also like