Data types & Operators

 

Data types

Number: Used to represent a number such as 1, 3.14, or -10.

String: "Hello world!" This is used to represent text in a sentence or two, such as "JavaScript".

Boolean: Represents true or false. used in functions and conditions.

Null: Indicates that no value was created intentionally.

Undefined: Indicates a variable that has been declared but not yet assigned a value.

Object: A complex data type that can contain many values ​​and objects. Objects can be created using curly braces {}.

Operators, on the other hand, are symbols or elements used to control values ​​and variables. JavaScript provides many operators, including:

1.Arithmetic operators: addition (+), subtraction (-), equals (*), division (/), etc. It is used for basic mathematic calculations.

2.Assignment Operators: It is  used to assign values to variables like the equal sign (=) or +=, -= , *= etc. 

3.Comparison operators: equal (==), not equal (!=), greater than (>), less than (<), etc.

4.Logical operators: Used to perform logical operations on Boolean values ​​such as AND (&&), OR () and NOT (!).

5.Unary operators: Used to perform single operations such as the increment (++) and decrement (--) operators.


Comments

Popular posts from this blog

Knapasack

If else condition

COMPLETE WEB DEVELOPMENT BOOTCAMP:practice.html