Question 1
Back to Exercise
After let s = "code"; s.toUpperCase();, what is s?
- A "code" – strings are immutable, so the method returns a new string that was not stored Correct
- B "CODE"
- C "Code"
- D undefined
Correct Answer: Option A
Every string method returns a new value. Write s = s.toUpperCase() to keep the result.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!