Introduction to
JavaScript
JavaScript is a high level scripting language the power the .it was developed by Brenden Eich in
nest cap navigation [Link] is standardize by ECMAScript. it is use to create user interaction, for
mobile, game development with the help of Frasier.
syntax of JavaScript is the settle of rules that determine how JavaScript programing language are
understood. This rule include how to describe variables
Basic syntax rule in JavaScript
· Case sensitive language
· Statement end with semicolon (optional)
statements and semicolon
· grouping code into executable instrument
case sensitivity
· variable names and keywords are case-sensitive
comments
· single-line (//)
· multiple-line (/**/)
variable is used to store data. it is also container to store data.
they are the three ways to store data var, let, const
· var: Function-scooped
· let: block-scooped
· const: block-scooped, immutable.
Difference between var, let, const
var allows redeclaration
let and const restrict redeclaration
Scope
global scope: accessible everywhere
function scope: limited to
onlick (it help in showing a message) =”alert(it is used
for poop up messages )”
Data Type
Primitive data types:
String: sequence of character in a double quote single quote in
a back thick
Number: it is a integer and flow sequence
Symbol: they are unique
Null: represents no value
Undefined: variable declared not assigned
Bight: they are numbers that are large
Boolean: it is a true or false value
Non primitive
Object: it is the collection key-value pairs
Array: it is an order list of element
Operator
Type of operator
Arithmetic operator
Comparison operator: ==, ====, != ,!==, <,>
Functions