Open in app
Home
Notifications
Lists
Stories

Write
Mohammad Salman
Mohammad Salman

Home

Feb 6, 2021

Closure-JavaScript

It allows a function to access variables from a enclosing scope or environment even after it leaves the scope in which it was declared. — It allows a function to access variables from a enclosing scope or environment even after it leaves the scope in which it was declared. function democracy() { let india = “india”; return function usa() { let america = “america”; return function sauth() { let africa = “africa”;

Developer

2 min read


Feb 5, 2021

JavaScript Destructuring

It is convenient way to extract multiple values stored from arrays and object. It make possible to unpack values from arrays and… — It is convenient way to extract multiple values stored from arrays and object. It makes possible to unpack values from arrays and properties from object. Example:- const course = { courseName: “JavaScript”, duration: “Six Months”, tutor: “Salman” }; function india({courseName,duration, tutor}) { console.log(courseName); //JavaScript console.log(duration); //Six Months console.log(tutor); …

Java Script

2 min read

Mohammad Salman

Mohammad Salman

Software Engineer.

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable