Skip to content

sufianWG/githubissuetracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Answer of following questions:

1️⃣ What is the difference between var, let, and const?

Answer: There are some difference between var, let and const.. but the main differences are the following: 'var' is function scoped, 'let' & 'const' are block scoped. can be reassign value of the variable by using 'var' & 'let', but it's not possible to reassign value of the variable using 'const.' can be redeclare with same variable name using 'var', but not possible redeclare using 'let' & 'const'. "var" is hoisted but shows 'undefined'. "let" & "const" are also hoisted but have TDZ.

2️⃣ What is the spread operator (...)?

Answer: spread operator mean using three dots in array or object. basically can be use spread operator to expand the array/object. Also usefull to copy, merge update array or object using spread operator. can be use in argument in function.

3️⃣ What is the difference between map(), filter(), and forEach()?

Answer: there are some difference between map(), filter() & forEach() that are following: map() use to tranform data, filter() use to select data with condition., forEach() use to run loop. map() make new thing of each element, but filter() select like choose data as pe rthe condition. map() return new array, filter() also return new array, but forEach return nothing. map() & filter() chainable, but the forEach() is not chainable, because it's not return anything.

4️⃣ What is an arrow function?

Answer: Arrow function is short syntax function. to create this function use "=>". using implicit return possible. Arrow function doesn't create "this" itself, but the normal function can create "this" itself. Arrow function is very useful in callback.

5️⃣ What are template literals? Answer: The template literal mean using backtick (`). It's the moderan way to write string. It's very usefull to set variable easily, in writing multi-line string. using template literal easily can use experession. It's very easy to write multi line string using temlate litera, but it was complex to write multi-line string in old method. So, template literal is smart string.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors