String Manipulation

JavaScript Fundamentals12 pts

Back

Working with Strings

Strings are sequences of characters. JavaScript provides many methods to manipulate text: split, join, replace, trim, toUpperCase, and more.

Template literals (backticks) let you embed variables and expressions directly in strings using ${}. They also support multi-line strings!

Output:
  • Create function capitalize
  • capitalize("hello") should return "Hello"
  • Should work for any word
What does "hello".toUpperCase() return?
Select an answer