0 of 10 problems solved • 0%
Use in a course

Strings and Text

10 exercisesEasy

Strings represent the text shown in messages, labels, and web pages. Template literals use backticks and ${...} placeholders to combine words with changing values cleanly.

const firstName = "Ada"; const completed = 7; const message = `${firstName} completed ${completed} exercises.`; console.log(message);

The examples move from creating and joining strings to measuring them with .length and using methods such as .trim(), .toUpperCase(), and .slice(). These operations are small, but they form the basis of most text formatting in an interface.