- Hello World
- Create a new HTML file and add the following code:
- Datatype
- JavaScript has several built-in data types:
- If-Else Statement
- The if-else statement is used to execute different blocks of code based on a condition.
- Switch Case
- The switch case statement is used to execute different blocks of code based on the value of a variable
- For Loop
- The for loop is used to execute a block of code repeatedly for a specified number of times.
- While Loop
- The while loop is used to execute a block of code repeatedly while a specified condition is true.
- String Methods
- JavaScript has several built-in string methods that can be used to manipulate strings.
- Array Methods
- JavaScript has several built-in array methods that can be used to manipulate arrays.
- Math Methods
- JavaScript has several built-in math methods that can be used to perform mathematical operations.
- Date Methods
- JavaScript has several built-in date methods that can be used to work with dates.
- Events
- JavaScript can be used to handle events such as mouse clicks, keyboard input, and form submissions.
- Try-Catch Error Handling
- JavaScript has a try-catch block that can be used to handle errors and exceptions.
- Window Methods
- JavaScript has several built-in window methods that can be used to interact with the browser window.