Let's Learn Vocabularies

আপনি এখনো কোন Lesson Select করেন নি

একটি Lesson Select করুন।

Frequently Asked Questions

1. What is the difference between var, let, and const?
-var is function-scoped, can be re-declared/reassigned, and is hoisted with undefined.
-let is block-scoped, cannot be re-declared but can be reassigned, and is hoisted without initialization.
-const is block-scoped, cannot be re-declared or reassigned, but allows modifying object/array properties-
2. What is the difference between map(), forEach(), and filter()?
- map() returns a new array by transforming each element.
-forEach() loops through elements but does not return a new array.
-filter() returns a new array with elements that pass a condition.
3. What are arrow functions, and how are they different from regular functions?
Arrow functions are functions without a name and are not bound by an identifier.Arrow functions (()=>{}) have a shorter syntax, do not bind this, and cannot be used as constructors, unlike regular functions (function(){}). Arrow functions do not return any value and can be declared without the function keyword.
4. How do javascript Promises work?
JavaScript Promises represent the eventual completion (or failure) of an asynchronous operation and its result. They have three states: pending, fulfilled, and rejected, and use .then(), .catch(), and .finally() to handle outcomes.
5. How does closure work in javascript?
In JavaScript, closure occurs when a function retains access to variables from its lexical scope (the scope in which it was defined), even after that scope has finished executing. This allows the function to "remember" and use those variables even when called outside of their original scope.