LearnFrenzy
Sign in Take a free test

Data Types · JavaScript Data Types MCQ · Question 11

Strings are immutable Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 11 Back to Exercise

After let s = "code"; s.toUpperCase(); what is the value of s?

  • A "code" – string methods return a new string and never change the original Correct
  • B "CODE"
  • C undefined
  • D A String object
Correct Answer: Option A

Strings are immutable primitives. Keep the result: s = s.toUpperCase().

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!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links