Closure

the Closure is the default behavior of javascript no need to code separately.even the parent function returns the value also child function can access everything from the parent function. have an example below

Immediately Invoked Function Expressions (IIFE)

basically, we need to call the function for use, but if we want to immediately call the function then we can use IFFE, IFFE making process is function must be inside the first bracket, have an example within the array:

--

--

Try…catch

It’s so common for every programmer handling error In JavaScript, I would like to explain why we should use the try and catch the try statement allows you to add a block of code that will be tested for errors when it is executed. If an error does occur in the try block, the corresponding catch statement will be executed. You can think of the try and catch statements as a pair. have an example below:

Block Binding in Loops

This is one area where developers most want block-level scoping of variables is within for loops, hoisted. Follow the two examples below:

--

--

the string concat method separate value make a combined single line new string or we can say it’s added something example is below:

Array concat

the array concat method separate value make a combined single line new Array or we can say it’s added something example is below:

--

--

String.charAt() method return a new string including of the single the encoding is variable-length code unit located at the offset into the string, an example is below:

Let me explain we know programming language start count from zero variable myString the first letter is I equal 0(zero), and in the string empty space also count as a number so that the variable index value is 7 equal m; I=0, empty space =1, L=2, o=3, v=4, e=5, empty space =6, m=7

--

--