
Apu
February 18, 2023 ›
#Javascript
›
#Q&A
❌
Which of the following options is the correct syntax for the following code in JavaScript?
- A) let x = 20;
- B) var x 20;
- C) x = 20;
- D) const x 20;
The correct answer is A) let x = 20;
Explanation: the let keyword is used to declare a variable in JavaScript, and the assignment operator ( = ) is used to assign a value to the variable. Therefore, the correct syntax for the code in question is let x = 20;.
save
listen
AI Answer
Which of the following options is the correct syntax for the following code in JavaScript?
0
A) let x = 20; B) var x 20; C) x = 20; D) const x 20; The correct answer is A) let x = 20; Exp…
asked
Apu
0 answers
2915
A) let x = 20; B) var x 20; C) x = 20; D) const x 20; The correct answer is A) let x = 20; Exp…
Answer Link
answered
Apu