0% found this document useful (0 votes)
18 views1 page

History of JavaScript

Uploaded by

tejavitap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

History of JavaScript

Uploaded by

tejavitap
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

History of JavaScript

It was created by Brendan Eich in 1995.

Statically Typed Languages: Types are checked at compile-time. Once a variable is


declared with a type, its type cannot change. Errors are caught before running the
program.
Examples: C, Java, Swift.

Dynamically Typed Languages: Types are checked at runtime, meaning a variable can
change its type as the program runs.
Examples: Python, JavaScript, Ruby.

Nominal Typing: Focuses on the "name" or label of the type. If two types have
different names, they are treated as different.

Structural Typing: Focuses on the "structure" of types. If two types have the same
structure, they are treated as the same.

Duck Typing: Focuses on behavior. If something behaves the way you expect, you can
use it, regardless of what it’s called.

scope variables:
1.global variable = is applicable for all the everywhere in the code.
2.local variable = is applicable for only within a block like function,etc..
a. function scope:
Variables declared inside a function can only be used within that
function.
b .block scope :
Variables declared using let or const inside {} (blocks like if, for, etc.)
are limited to that block.

----impotant is var is both everywhere in block scope is allowed but let and cons
are limited which means .these are used in function,if,etc.. within only ---------

You might also like