Introduction to Javascript
Data Types
Javascript has 6 primitive data types
numberstringbooleanundefinednullSymbol
Objects
Objectscan store a collection of data types, which are then calledproperties.- Each property has a
keyandvaluekeyis ofstringdata typesvaluecan be ofany data type.
- If a
valueis a functon, its called as amethod
Equality in Objects
== or === only tests if both operands are same objects.
Arrays
Objects that store values in order.
Functions
Use function keyword to define a function.
- You may provide a name, if not, its called an
anonymousfunction. - Primatives data types passed in the function are passed by value but Objects are passed by reference.
Functions( Both named or anonymous) can be assigned to a variable.
Source: