more_horiz
Home home
  • photo
  • apps
  • attachment
  • add
  • file_upload

Q. What are first-class functions?
In some programming languages, there is a concept of first-class functions. First-class functions are those treated like ordinary variables. You can assign them to some other variable, pass them as an argument to other functions, and return them from another function. For example, we can assign a function `x` to a variable called `y`.

chat_bubble_outline restart_alt favorite_border upload

Q. What are the function statements and function expressions?
When a function gets created using the `function` keyword, it’s called a function statement. Assigning a function to a variable is a function expression.

chat_bubble_outline restart_alt favorite_border upload

Q. What is function currying?
Function currying is a process in which we convert a function with multiple parameters to a chain of functions with a single parameter.

chat_bubble_outline restart_alt favorite_border upload

Q. What is prototype chaining?
Prototype chaining is the process of building new objects from old ones. Essentially, it’s like inheritance in a class-based language.

chat_bubble_outline restart_alt favorite_border upload

Q. What is the difference between the null and the undefined values?
Variables get assigned a `null` value to indicate they are declared and assigned but don’t point to anything. An `undefined` variable is declared but not initialized.

chat_bubble_outline restart_alt favorite_border upload

Q. What is the difference between == and ===?
The `==` operator is also called a type-converting equality check operator. When we compare values of different data types, it attempts to do type conversions before checking the equality. The `===` operator is also called a strict equality operator. JavaScript engine will make no type conversions in this case.

chat_bubble_outline restart_alt favorite_border upload

Q. What are higher-order functions?
Higher-order functions can accept a function as an argument or return a function as a result.

chat_bubble_outline restart_alt favorite_border upload

Q. What is JSON?
JSON stands for JavaScript Object Notation. It stores data in a format similar to JavaScript objects.

chat_bubble_outline restart_alt favorite_border upload

Q. What is hoisting?
Hoisting is the process by which the JavaScript engine sets aside memory for variables, functions, and classes to give the impression that they are at the top of the code.

chat_bubble_outline restart_alt favorite_border upload

Q. What are closures?
A function bound to its immediate surroundings creates a closure. Essentially, a function defined inside another function is a closure. The variables and operations of the outer function are accessible to the inner function.

chat_bubble_outline restart_alt favorite_border upload

Q. What is scope in JavaScript?
A scope is a code section allowing us to access specific variables and functions. It determines the visibility of variables and functions. Variables and functions declared within a particular scope cannot be accessible outside the scope.

chat_bubble_outline restart_alt favorite_border upload

Q. What is the difference between local storage and session storage?
Both local storage and session storage store data. Local storage persists the data even when we close the browser. In contrast, session storage removes the data when we close the browser tab.

chat_bubble_outline restart_alt favorite_border upload

Q. What are the three types of JavaScript errors?
Syntax Error: The syntax of the program is not correct. Reference Error: The JavaScript Engine cannot find a reference to a variable or function in memory. Type Error: Trying to reassign a const variable will lead to a Type Error.

chat_bubble_outline restart_alt favorite_border upload