ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 57 - Certified JavaScript Developer I discussion

Report
Export

Given the following code:

Counter = 0;

const logCounter = () => {

console.log(counter);

);

logCounter();

setTimeout(logCOunter, 1100);

setInterval(() => {

Counter++

logCounter();

}, 1000);

What is logged by the first four log statements?

A.
0 0 1 2
Answers
A.
0 0 1 2
B.
0 1 2 3
Answers
B.
0 1 2 3
C.
0 1 1 2
Answers
C.
0 1 1 2
D.
0 1 2 2
Answers
D.
0 1 2 2
Suggested answer: C
asked 23/09/2024
HAO KANG SUNG
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first