Data Types in JS
Primitive Types
- Number
- Boolean
- String
- Undefined
- Null
- Bigint
- Symbol
NaN in JS
The NaN global property is a value representing Not-A-Number.
Operator Precendence
This is the general order of solving an expression.
- ()
- **
- *,/,%
- +,-
Note:- power wale same operator jayada rahne par right to left solve karenge sirf power wale ko, baki ko left to right as u studied in c.
% modulo operator
= assingment oprerator
Identifier Rules
All JavaScript variables must be identified with unique names (identifiers).
• Names can contain letters, digits, underscores, and dollar signs. (no space)
• Names must begin with a letter.
• Names can also begin with $ and _ .
• Names are case sensitive (y and Y are different variables).
• Reserved words (like JavaScript keywords) CANNOT be used as names.
let keyword
Syntax of declaring variables.
const keyword
values of constants can't be changed with re-assignment & they can't be re-declared.
var keyword
Old Syntax of writing variables. //pahale use hota tha, 2015 me let aya to ab use nahi hota ha.
Boolean in JS
Boolean represents a truth value -> true or false I yes or no. //case sensetive true,false,thik se likho😢
Javascript ke andar ham variable ka type kabhi bhi change kar sakte hai, but c++,java me nahi
What is TypeScript?
Static Typed, where JS is dynamic typed. //mtb eska variable ka type change nahi kar sakte hai,typescript javascript ka bhai.........
Designed by Microsoft
0 Comments