0% found this document useful (0 votes)
10 views7 pages

JavaScript Basics Day1

This document introduces JavaScript as a client-side scripting language that enhances web interactivity. It covers fundamental concepts such as variables, data types, operators, and conditionals, explaining how JavaScript is embedded in HTML and executed. Key examples illustrate the use of variables and conditionals in coding.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

JavaScript Basics Day1

This document introduces JavaScript as a client-side scripting language that enhances web interactivity. It covers fundamental concepts such as variables, data types, operators, and conditionals, explaining how JavaScript is embedded in HTML and executed. Key examples illustrate the use of variables and conditionals in coding.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JavaScript Basics - Day 1

What is JavaScript, Variables, Data


Types, Operators, Conditionals, Loops
What is JavaScript?

• A scripting language for the web


• Runs in browser (Client-side)
• Makes websites interactive
• Example: sliders, form validation, dynamic
content
How JS Works

• Embedded in HTML using <script>


• Executes top to bottom
• Can manipulate HTML/CSS (DOM)
Variables

1. Containers for storing data


2. Declared using var, let, const
3. Example: let name = "Your Name";
Data Types

1. String: "Hello"
2. Number: 5, 3.14
3. Boolean: true, false
Operators

1. Arithmetic: +, -, *, /
2. Comparison: ==, !=, ===, <, >
3. Logical: &&, ||, !
Conditionals

if (age > 18) {


[Link]("Adult");
} else {
[Link]("Minor");
}

You might also like