Javascript Basics Better Presentation
Javascript Basics Better Presentation
● Introduction ● D a t a Ty p e s
● JavaScript(JS) & ● Functions
ECMAScript(ES) ● Arrays
● Va r i a b l e ● Equality Operator
Declaration
● D y n a m i c Ty p i n g
B r o w s e r U n d e r s t a n d o n l y 3 Te c h n o l o g i e s
and many
TypeScript Language
more...
● Javascript is the base for all the above technologies, you can only master them if you know plain
javascript.
● Knowing Plain Javascript gives you the confidence that you can easily learn any JS-based
technologies on-demand and in the fastest way.
JavaScript Facts
First Appeared December 4, 1995
Designed By Brendan Eich
Developer ● Netscape Communications
● Mozilla Foundation
JavaScript (JS) ? Is Language based on ECMAScript Standard.
ECMAScript (ES) ? Standard, Which was initially created from JS Language in year 1997 by ECMA International.
Other Languages that implemented ECMAScript in ● Jscript from Microsoft for IE Browser.
the Past? ● ActionScript from MacroMedia / Later owned by Abode.
Latest Javascript/ECMAScript Version ES 2019. ES version changes every year.
Current Implementation of ECMAScript Standard It is implemented in JS Engines such as V8, SpiderMonkey, JavascriptCore, ChakraCore etc.
JS Engines converts JS code into machine code for execute on a computer system.
At present, who maintained ECMAScript Standard? TC39 commitee is responsible for ECMAScript as of year 2020.
TC39 commitee has members from browsers owners like (Google, Microsoft, Apple &
Mozilla).
https://en.wikipedia.org/wiki/JavaScript
https://medium.com/free-code-camp/a-fascinating-and-messy-history-of-the-web-and-javascript-video-8978dc7bda75
More Info:
https://en.wikipedia.org/wiki/ECMAScript
https://en.wikipedia.org/wiki/List_of_ECMAScript_engines
JavaScript Basics
Variable Declaration in Javascript
Method Description
.indexOf ● Return the index number of
(item,?pos) the first occurance of an item
in an array.
● Return -1 if it do not found
the item in an array.
● Only works for simple types
like string & number array. Do
not work on object type
values in an array.
.includes Return true if it finds the
(value) item/value else return false.
A r r a y S e a r c h M e t h o d s : F o r O b j e c t Ty p e
Method Description
.findIndex ● Expect predicate function as input and
(function) based on that function, return the index
number of the first occurrence of the
matched item.
● Return -1 if it do not found the item in an
array.
.find Expect predicate function as input and based
(function) on that function, return the value of the first
occurance of the matched item.
Note: A predicate function is a function that returns a boolean value i.e. true or false.
Equality Comparison Operators
●
Strict (=== AND !==): In strict comparison
no datatype conversion is done before
comparison.
● Type-Conversion (== AND !=): Converts
the value to the same type before making
the comparison. This is also known as
abstract equality comparison.
● NOTE: You should avoid Type-Conversion (== AND !=)
operator as it is rarely required to convert the type before
equality operation.