Notes
Javascript Basics
Content of the notes (10)
Page 1
Javascript Engine
v8 in chrome and opera
spidermonkey in firefox
trident and chakra for IE
chakracore for microsoft edge
nitro and squirellfish for safari.
2:how javascript engine works.
Page 2
Operators
1:unary operators.
unary operators converts the strings to integers.
2:string concatination
if any of the operand is string then ther operand will also be converted into string while concatination.
3:increment/decrement operator
4:Assigmnet operator
it also return value
5:exponentiation and remainder operator
http://javascript.info/operators
Page 3
Switch Case
1:How switch works.
2:Use of "break" statement in switch case.
3:case grouping by removing "break" statement.
4:Type matters.Argument checked must be strictly equal to case values.
http://javascript.info/switch
5:Automatic semicolon insertion for line break.
6:Shortcut key to comment code.
http://javascript.info/structure
Page 4
Function
1:How to create function with proper syntax.
2:scope of variables is local inside function.
3:Function can access variables declared outside of function.Local variable replaces the outside variable.
4:copy of the variable is passed as parameter to function.
5:If parameter is not provided then its value becomes "undefined".
6:how to set default value of parameter.
7:How to return the value .
It is possible to use "return" without a value in that causes the function to exit immedieately.
If "return" without a value or no "return" then it will return "undefined".
http://javascript.info/function-basics
8:What is function expression.
9:callback function
10: Arrow functions
Page 5
"Use Strict" mode
1:What is strict mode.
2:always use at the first line of the script.
3:can be used on function basis also.
4:there is no such thing called "no use strict".
http://javascript.info/strict-mode
Page 6
prompt
1:what is prompt box.
2:what is returned when no value entered by user.
3:how to set the default value.
confirm
1:what is confirm box.
2:what values are returned.
http://javascript.info/alert-prompt-confirm
Page 7
Data Types
1:what is dynamically typed language.
2:Infinity
3:backstick quotes.how to embed variable and expression inside backstick quoted string.
4:NUll value ,it means "unknown value","empty","nothing".
5:Undefined value,means value is not assigned to a variable.We can also assign a variable a value "undefined".
6:typeof operator.
http://javascript.info/types
Type Conversion
1:String().
2:Number()
3:Boolean()
Page 8
Logical Operators
1:AND OPERATOR.operates from left to right and if any false value it got ,stops the execution and returns the that value.If all other operands have been assessed (i.e. all were truthy), return the last operand
2:OR OPERATOR. operates from left to right and if any TRUE value it got ,stops the execution and returns the that value.If all other operands have been assessed (i.e. all were FALSY), return the last operand.
3:NOT OPERATOR.
http://javascript.info/logical-operators
1:While Loop
2:Do while Loop.
3:For Loop.
-Inline variable decleration.
4:Break statement.
5:Continue Statement.
6:Label
http://javascript.info/while-for
Page 9
Objects
1:Multiple ways to create an object.
2:Multiple ways to access an object property.
3:How to insert a new property to an object.
4:How to delete a property of an object.
5:How to use and access multiword property names.
6:How to use computed properties.
7:Reserved words are allowed as property names.
8:Check weather a key exists in object or not.
9:How to walk through each key and value of an object.
10:Are objects ordered?
11:Objects are copied by reference and not by value.
http://javascript.info/object
Page 10
Symbol
1:What is symbol an dhow to create a symbol.
2:Symbols dont auto-convert to string so we cannot alert a symbol without converting it to a string using toString() function.
3:A symbol cannot be accessed using for(key in) loop.They can ab accessed directly using their value.
http://javascript.info/symbol
Information
- Description
- Note on Javascript Basics, created by Ajay Sarwara on 15/03/2018.
- Created by
- Ajay Sarwara
- Views
- 0
- Rating