Skip to content

Latest commit

 

History

History
44 lines (24 loc) · 1.21 KB

05-basic-knowledge-exercise.md

File metadata and controls

44 lines (24 loc) · 1.21 KB

Question 1

Create two variables and assign some numbers in them. Now do below operations:

  • Addition
  • Multiplication
  • Substraction
  • Divide

Question 2

Take one number. If number is odd then print "odd" else print "even".

Question 3

Using prompt ask user to enter name and then show the name in alert.

Question 4

Take any two numbers. If first number is less than second number than print your name, age and mobile number else print your father name, age and mobile number.

Question 5

Take two numbers. Now using && and || operator check if both numbers are divisible of 5 && 10 or not. Also check both numbers are even or not.

Question 6

Print Hello world using console.log, window.alert and document.write.

Question 7

Take all the 6 falsy values and check in if condition for the verification.

Question 8

Using confirm box ask questions "Do you want to play?". if user click on OK button then print yes and if user click on Cancel then print No.

Question 9

If total members in your family are more than 5 then print "Big Family", if members are between 3 to 5 then print "Small family" else print "Very small family".

Question 10

Using ++, -- print 1 to 10 and then 10 to 5.