JavaScript Basics – Self Written Notes
What is JavaScript?
JavaScript is a lightweight interpreted programming language used to make web pages interactive.
Where JavaScript Runs
JavaScript runs in browsers and on servers using [Link].
Variables
Variables are used to store data. Keywords: var, let, const.
Data Types
Number, String, Boolean, Undefined, Null, Object, Array.
Operators
Arithmetic, comparison, logical, and assignment operators.
Functions
Functions are reusable blocks of code that perform a task.
Conditions
Use if, else if, else, and switch statements.
Loops
for, while, and do-while loops repeat tasks.
Arrays
Arrays store multiple values in a single variable.
Objects
Objects store data as key-value pairs.
JavaScript in HTML
JavaScript is added to HTML using the script tag.
Author Note
This document is created by me for learning and sharing purposes.