HTML
HTML
1. Html Tag
Html tag is the root element of the container
It is a container tag / pair tag
2. Head Tag
It is a container tag
The content we want to display should not be written in
head tag
The meta data of our website we have to write within head
tag
Inside head tag we have tittle tag
3. Tittle Tag
It is a container tag
The tittle of our web page we have to write within tittle tag
This title should be displayed on browser tab
4. Body Tag
It is a container tag
The content we want to display should be written inside
body tag
5. Meta Tag
Meta tags are unpair tags / Non -container tag
It is used to store additional information of our website
Java /
JS
C , C+
+
Assem
bly
Binary
Tokens
24/7/2024
Types of Tokens
1. Keyword
2. Identifier
3. Operator
4. Literals
5. Punctuators
Keywords
Keywords are predefined words that is used to perform some
specific task
It is always written in lower case letters
If, Else , while , For , do ,switch , continue , break , function ,
Try – catch , throw ,this
Var , let , const , function
1.Var (Awara)
Multiple times declaration
Multiple time initialization
Var is global scoped
Var gf = “Naina”;
Var gf = “Sunaina”;
Var gf = “Muskan”;
gf = “Ruchi;
2.Let(Pagal)
let gf = “Khushi”
let gf = “Anjali” ---- Error
gf = “Anjali”;
3.Const(Deewana)
One time declaration
One time initialization
Const is blocked scoped and local scoped
var
Variable declared with var goes to global scope
Multiple times declaration is possible
Multiple Times initialization is possible
Ex-
Let
Variable declared with Let is blocked scope
One time declaration
Multiple times initialization
Const
Variable declared with const is block scope.
One time Declaration
One time Initialization
1. Arithmetic operators
Additon(+)
Subtraction(-)
/
*
**
%
2. Assignment Operator
3. Compound Operator
4. Relational Operator
<
>
<=
>=
== (Loose Equality)
=== type conversion
!= (Loose not Equality)
!== (first check the data type)
5. Logical Operator – Boolean Result
6. Ternary Operator
7. let age = 18;
8.
9. let Result = age >=18 ? "You can drive the car" : "you cannot drive the car";
10.
11. console.log(Result)
Global scope
1 a=1
a : undefined 2 b=2
3 c=3
d : undefined
Block Scope
b: uninitialized
c: uninitialized
Block
VP EP
b: uninitialized a = 10
b = 20
c: uninitialized c = 30
d = 40
C.log(a)
C.log(a)
C.log(a)
C.log(a)
}
12/8/2024
1. Hoisting
The ability of js engine to access a variable before its
declaration statement
ex –
console.log(a)
var a = 1;
example
console.log(a)
let a = 1;
Question
console.log("Start")
let a = 10;
{
console.log (a)
let a = 10
}
console.log(a)
console.log(b)
console.log("end")
1. Console.log(“started”)
Global scope 2. a = 10;
3. {
4. }
Block Scope
a : uniatialized -10
Block
VP EP
Call stack
Block
Global
20/8/2024
ToNumber(a)
Number - Number
Symbol - TypeError
BigInt - TypeError
Null - +0
False - +0
true - 1
string - StringToNumber
Undefined Nan
Const b = +a //New
Function in Js
Types of Functions in Js