TGViewer
Web Development Web Development @webdevcoursefree · 79.7K subscribers
Post #3757 2.97K
60. Difference Between Synchronous and Asynchronous Programming

Synchronous
: Executes line by line 

Asynchronous : Executes independently 

Example:

setTimeout(() => {

   console.log("Hello");

}, 2000);

🧠 61. What is Promise in JavaScript?

Promise handles asynchronous operations. 

States: 

• Pending 

• Resolved 

• Rejected 

Example:

const promise = new Promise((resolve, reject) => {

   resolve("Success");

});

🧠 62. What are async and await?

Used to simplify asynchronous code. 

Example:

async function getData() {

   const response = await fetch(url);

}

🧠 63. What is setTimeout?

Runs code after specific delay. 

Example:

setTimeout(() => {

   console.log("Hello");

}, 3000);

🧠 64. Difference Between map(), filter(), and reduce()

Method : Purpose

map() : Transform array

filter() : Filter array

reduce() : Reduce array to single value 

Example:

const nums = [1,2,3]; 

nums.map(n => n * 2);

🧠 65. What is Destructuring?

Extract values from arrays or objects. 

Example:

const person = {

   name: "Deepak"

}; 

const { name } = person;

🧠 66. What is Spread Operator?

Spread operator expands elements. 

Example:

const arr1 = [1,2];

const arr2 = [...arr1, 3];

🧠 67. What is Rest Operator?

Collects multiple values into array. 

Example:

function sum(...nums) {

   console.log(nums);

}

🧠 68. What is Template Literal?

Template literals allow embedded expressions. 

Example:

let name = "Narayan"; 

console.log(Hello ${name});

🧠 69. What is Optional Chaining?

Safely accesses nested properties. 

Example:

user?.address?.city

🧠 70. Explain this Keyword

this refers to current object. 

Example:

const user = {

   name: "Radhe",

   greet() {

      console.log(this.name);

   }

};

🧠 71. Difference Between Function Declaration and Function Expression

Declaration : Hoisted 

Expression : Not fully hoisted 

Example:

function test() {} 

const demo = function() {};

🧠 72. What is Prototype?

Prototype allows inheritance in JavaScript. 

Example:

function Person() {} 

Person.prototype.age = 25;

🧠 73. What is Prototypal Inheritance?

Objects inherit properties from other objects. 

Example:

child.proto = parent;

🧠 74. What is JSON?

JSON stands for: 👉 JavaScript Object Notation 

Used for data exchange. 

Example:

{

   "name": "Sanyam",

   "age": 26

}

🧠 75. Difference Between localStorage and sessionStorage

localStorage : Permanent

Shared across tabs 

sessionStorage : Temporary

Limited to tab

🧠 76. What is NaN?

NaN means: 👉 Not a Number 

Example:

console.log("abc" / 2);

🧠 77. What are Truthy and Falsy Values?

Falsy Values: 

• false 

• 0 

• "" 

• null 

• undefined 

• NaN 

Everything else is truthy.

🧠 78. What is Debounce?

Debounce limits repeated function calls. 

Used in: 

• Search bars 

• Resize events 

Example:

function debounce(fn, delay) {}

🧠 79. What is Throttle?

Throttle limits execution rate. 

Example:

function throttle(fn, limit) {}

**🧠 80.

What is Currying?**

Currying converts function with multiple arguments into nested functions. 

Example:

function add(a) {

   return function(b) {

      return a + b;

   };

}

Double Tap ❤️ For Part-4
  • ❤ 12
More from @webdevcoursefree
  1. Oct 13, 2026𝗧𝗢𝗣 𝗙𝗥𝗘𝗘 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝗧𝗢 𝗕𝗢𝗢𝗦𝗧 𝗬𝗢𝗨𝗥 𝗦𝗞𝗜𝗟𝗟𝗦 𝗜𝗡 𝟮𝟬𝟮𝟲! Explor…
  2. Oct 12, 2026For example: Go to Profile → <a> Submit Form → <button> Open Article → <a> Delete Account…
  3. Oct 12, 2026🌐 Web Development Roadmap — Part 16 HTML Links — Tag Links are one of the most important…
  4. Oct 12, 2026🚀 𝗪𝗵𝗶𝗰𝗵 𝗧𝗲𝗰𝗵 𝗦𝗸𝗶𝗹𝗹 𝗪𝗶𝗹𝗹 𝗬𝗼𝘂 𝗠𝗮𝘀𝘁𝗲𝗿 𝗶𝗻 𝟮𝟬𝟮𝟲? Want to buil…
  5. Oct 9, 2026Post #4079
  6. Oct 9, 2026Post #4078
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →