πŸ“Š JavaScript
Q. What is the output of this code?
Code:
let name = 'MCQ';
name[0] = 'X';
console.log(name);
  • (A) XCQ
  • (B) MCQ
  • (C) undefined
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) MCQ

Explanation: Strings are immutable in JavaScript; indexing does not allow reassignment.

Explanation by: Chandani
Strings are immutable in JavaScript; indexing does not allow reassignment.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
63
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Chandani
Publisher
πŸ“ˆ
87%
Success Rate