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 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 tha...
Comments