Q. What is the output of this code?
Code:
let name = 'MCQ'; name[0] = 'X'; console.log(name);
β
Correct Answer: (B)
MCQ
Explanation: Strings are immutable in JavaScript; indexing does not allow reassignment.