In this part let’s talk about some important things like syntax, variables, ….etc.

- JavaScript uses the
**var**keyword to declare variables.var x;

x = 10; - JavaScript uses an
**assignment operator**( = ) to assign values to variables.var x = 4;

var y = 10; - JavaScript uses
**arithmetic operators**( + – * / ) to compute values.(2 + 3) * 6; - JavaScript allows you to work with
**three**primitive data types.Numbers: 12, 12.50

Strings: “Hello Sam”

Boolean: true or false. - JavaScript comments. Code after double slashes
**//**or between**/***and***/**is treated as a**comment**.// This is a single line comment./*

This is a multi line

comment in JavaScript

*/ - JavaScript
**variables**must be**identified**with**unique names**.

These unique names are called**identifiers**.

JavaScript identifiers. In JavaScript, the first character must be a letter, an**underscore (_)**, or a**dollar sign ($).**Subsequent characters may be letters, digits, underscores, or dollar signs.**Numbers**are not allowed as the first character.

JavaScript identifiers are**case sensitive**. - JavaScript Arithmetic Operators

Operator Description + Addition – Subtraction * Multiplication / Division % Modulus ++ Increment — Decrement - JavaScript Assignment operators.

Operator Example Same As = x = y x = y += x += y x = x + y -= x -= y x = x – y *= x *= y x = x * y /= x /= y x = x / y %= x %= y x = x % y

Advertisements