Javascript
Javascript
JavaScript is a high-level, interpreted programming language that enables interactive web pages. It is an
essential part of web technology, along with HTML and CSS.
### 2. Setting Up
To start using JavaScript, you need a text editor (like Visual Studio Code, Sublime Text, or even Notepad)
and a web browser (like Chrome, Firefox, or Edge).
JavaScript code can be added to an HTML document using the `<script>` tag.
```html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>Hello, World!</h1>
<script>
console.log('Hello, World!');
</script>
</body>
</html>
```
### 4. Variables
Variables store data values. Use `var`, `let`, or `const` to declare variables.
```javascript
var x = 5;
let y = 10;
const z = 15;
```
### 6. Operators
JavaScript includes arithmetic (`+`, `-`, `*`, `/`), comparison (`==`, `===`, `!=`, `!==`), logical (`&&`, `||`, `!`),
and assignment (`=`, `+=`, `-=`) operators.
```javascript
let a = 5;
let b = 2;
```
### 7. Functions
```javascript
function greet(name) {
```
### 8. Conditionals
Use `if`, `else if`, and `else` to perform different actions based on conditions.
```javascript
console.log("Good morning");
console.log("Good afternoon");
} else {
console.log