You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanstyle="font-size: 0.8rem; border-bottom: 1pxsolidgrey;"> Updated Jan 04, 2023 </span>
7
+
<spanstyle="font-size: 0.8rem; border-bottom: 1pxsolidgrey;"> Updated Jan 11, 2023 </span>
8
8
9
9
In this article, we will cover a range of JavaScript interview questions, including those related to the latest versions of the language (ES6, ES7, ES8, and ES9).
10
10
@@ -181,6 +181,7 @@ Answer - 1, 2, 3, 4, 5
181
181
The forEach method is called on the arr array and a callback function is passed as an argument. The callback function will be executed for each element in the array, with the element passed as an argument to the callback. As a result, the output will be the elements of the array, 1, 2, 3, 4, and 5, printed on separate lines.
182
182
183
183
</details>
184
+
184
185
<details>
185
186
<summary>
186
187
<h3>7. Guess the output of this code?
@@ -200,3 +201,5 @@ console.log(x);
200
201
Answer - 1undefined
201
202
202
203
The if statement is evaluating the function f as a boolean value. In JavaScript, functions are truthy values, so the condition will evaluate to true and the code block inside the if statement will be executed. The value of x is then incremented by the string "function", which is the result of calling typeof f.
0 commit comments