Home
Search
Basic
If-Else
Looping
About
LEARN IF-ELSE OF JAVA SCRIPT
Start Learning
IF-Else (Practice session)
Pos Neg
Odd Even
Leap Year
Largest Num
WAP to accept any number and check whether the number is positive or negative.
Enter a Number
Result
Submit
Reset
WAP to accept any number and check whether the number is odd or even.
Enter a Number
Result
Submit
Reset
WAP to accept any year and check whether the year is a leap year or not.
Enter a Year
Result
Submit
Reset
WAP to accept three numbers and find the largest number among them.
Enter First Number
Enter Second Number
Enter Third Number
Result
Submit
Reset
Start your practice here
main.js
Output
//Write Your Code Here... //Check Leap Year Or Not let year = 2024; (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0 ? console.log(`${year} is a leap year`) : console.log(`${year} is not a leap year`);
Run Code