JavaScript is a programming language
JavaScript is a programming language
JavaScript Topic:
● Variable
● Datatype
● Operators
● Conditional statements
● Loop
● String
● Object
● Array
● Function
● Method
● Documents object model
● Events
● Classes
● Object
● Callbacks
● Promise
● Async Await
★comments:
Single Line comment:
//This a JavaScript note
Multiline comments:
/*This is a JavaScript note*/
Redeclared:
var a = “ name”
var a= “ full name”
console.log(a)
=>full name
updated:
var a= “name”
a=”full name”
console.log(a)
=>full name
★Datatypes:
1.Primitive Data types:
● number
● string
● boolean
● undefined
● null
● biglnt
● symbol
1.Arithmetic Operator:
+,-,*,/,%,**
2.Unary Operator:
++(increament),--(decreament)
Post:
let a= 5 ;
Console.log(“a=”++a);
=>a=6
Pre:
let a=5;
console.log(“a=”a++);
=>a=5
console.log(“a=”a)
=>a=6
3.Assignment Operator:
= , += , -= ,*= ,%= , **=
4.comparison Operator:
● Equal to : ==. also type: ===
● Not Equal to : !=. also type: !==
● Getter than : >
● Getter than equal to : >=
● Not getter than: <
● Not getter than equal to: <=
let a= 6;
let b=6;
console.log(“a===b:”a===b);
=> a===b: true
console.log(“a!==b:”a!==b);
=>a!==b:false
5.Logical Operator:
● Logical And : &&
● Logical OR : ||
● Logical Not : !
let a=6;
let b=7;
console.log( a!=b && a<b);
=>true
let a=6;
let b=7:
console.log(!(a>b));
=>true
6.Turnary Operator :
★Conditional statement:
● If statement:
● If-else statement :