JavaScript Tutorial-6 IF ELSE

JavaScript Tutorial-1 Getting Started:
JavaScript Tutorial-2 For Loop:
JavaScript Tutorial-3 Strings:
JavaScript Tutorial-4 Patterns (Part-1):
JavaScript Tutorial-5 Patterns (Part-2):

Amazon FunZone Reward:

if-else is used for conditionally rendering any data.
//body1 //if the condition is true this body1 will be executed
//body2 // if the condition is false the body2 will be executed

1.Write a js program to find if the number is an even or odd number.
2.Print “Pass” if a student scored more then 40 marks,”fail” if he/she scored less then 40 and “First Division” if he/she scored more then 60 marks.
3.Given n a input, Print “Barny” if the number is divisible by 4 or Print “Robin” if the number is divisible by 3.

Original source

2 thoughts on “JavaScript Tutorial-6 IF ELSE

Leave a Reply