
Apu
February 19, 2023 ›
#Javascript
›
#Q&A
❌
Which of the following is the correct output for the following JavaScript code?
- A) 1
- B) true
- C) undefined
- D) 0
<script> let myStr; console.log(myStr); </script>
If you run the above code, the output will be "undefined", which is option C) in the multiple choice question.
Explanation: The variable myStr is declared but not initialized, so its value is undefined.
save
listen
AI Answer
Which of the following is the correct output for the following JavaScript code?
0
A) 1 B) true C) undefined D) 0 <script>
let myStr;
console.log(myStr);
</scrip…
asked
Apu
0 answers
2915
A) 1 B) true C) undefined D) 0 <script>
let myStr;
console.log(myStr);
</scrip…
Answer Link
answered
Apu