DATA TYPES &JAVASCRIPT OPERATORS : #js2

Mahima
3 min readMar 9, 2023

--

1 . Data Types=>

》A data type, in programming, is a classification that specifies which type of value a variable has and what type of mathematical, relational or logical operations can be applied to it without causing an error.

• String

• Number

• Boolean

• Undefined

• Object

Javascript Type Conversion=>

》Important Notes

1.JavaScript considers 0 as false and all non-zero numbers as true. And, if true is converted to a number, the result is always 1.

2.String() takes null and undefined and converts them to string.

3.In JavaScript, undefined, null, 0, NaN, "converts to false. All other values give true.

• Number()

• String()

• Boolean()

Javascript Type Conversion values =>

2 . JAVASCRIPT OPERATORS =>

In JavaScript, an operator is a special symbol used to perform operations on operands (values and variables).

Types of Operators》》》6.

•Assignment Operators

• Arithmetic Operators

• Comparison Operators

•Logical Operators

• Bitwise Operators

•String Operators

●1● Assignment Operators

Assignment Operators are used to assign values to variables.

●2● Arithmetic Operators

Arithmetic Operators are used to perform Arithmetic calculations.

●3● Comparison Operators

Comparison Operators compare two values and return a boolean value, either true or false.

●1●Logical Operators

Logical Operators perform logical operations and return a boolean value, either true or false.

Or in other words 👇

For AND;

T T =T , T F =F, F T =F, F F =F .

For OR;

T T =T , T F =T, F T=T, F F=F.

For NOT;

T=F, F=T.

I hope this will help you 》》for any queries ♡comment feel free👇

Follow Mahima for more of these.

Thank you for reading….

HAPPY READING 📚

--

--

Mahima

Full stack web developer # freelancer ==<<exploring🚀< blogging