Hello World!
This text will be changed by JavaScript on clicking the button below.
1. Number Greater Than 10: Check if a number is greater than 10. Print "Greater than 10" or "10 or less."
2. Even or Odd: Check if a number is even or odd using an if-else statement.
3. Positive, Negative, or Zero: Check if a number is positive, negative, or zero and print the message.
4. Password Verification: Check if entered password is "admin123." Print "Login successful" or "Incorrect password."
5. Student Grade: Enter a score (0-100) and get grade: A (90+), B (80-89), C (70-79), F (below 70).
6. Voting Eligibility: Check if a person is eligible to vote (age 18 or above).
7. Larger Number: Enter two numbers and find the larger one. If equal, print "Both numbers are equal."
8. Leap Year: Check if a given year is a leap year (divisible by 4, but not by 100 unless also divisible by 400).
9. Vowel or Consonant: Check if a given character is a vowel (a, e, i, o, u) or a consonant.
10. Discount Calculator: Store offers 10% discount if total bill is greater than $100. Calculate final amount.
11. Print statements using for loop
Displaying the object using object.entries method
Create your own object: Input your first, last name, phone no., age, gender, profession
JavaScript Naming Conventions and Best Practices:
Data Types in JavaScript:
Type Casting in JavaScript:
Operators in JavaScript:
Control statements in JavaScript are commands that alter the normal sequential flow of program execution, allowing the code to make decisions, repeat tasks, and jump between different parts of a program based on specific conditions. They are typically categorized into three main types:
These statements allow the program to make decisions and execute specific blocks of code only if a condition or set of conditions is true.
These statements are used to repeatedly execute a block of code as long as a specified condition remains true.
These statements change the flow of execution within loops or functions.
All Events in JavaScript :
Functions in JavaScript:
Maps in JavaScript:
Set in JavaScript:
Regex, Search, and Replace in JavaScript:
Sychronous, Asynchronous, Promises, Async/Await with all methods and examples in JavaScript: