Skip to content

Commit

Permalink
Update 05-basic-knowledge-exercise.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sajidhamdard authored Mar 13, 2024
1 parent 0556a47 commit bd66e97
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Exercises-And-Solutions/exercises/05-basic-knowledge-exercise.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Question 1

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

- Addition
- Multiplication
Expand All @@ -9,36 +9,36 @@ Create two variables and store some numbers in them. Now do below operations:

### Question 2

Take one number. If number is odd then print odd else print even.
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 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.
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
Print Hello world using console.log, window.alert and document.write.

### Question 7

Take all the 6 falsy values and check in if condition.
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 then print yes and if user click on Cancel then print No
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
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
Using ++, -- print 1 to 10 and then 10 to 5.

0 comments on commit bd66e97

Please sign in to comment.