Skip to content
3 of 15

Strings ​

Strings use double quotes. Backticks make a template, where ${...} inserts the value of any expression, and which may span several lines:

pleno
let name = "Ada";
print(`Hello, ${name}! You have ${2 + 3} messages.`);
Run

Strings have methods: toUpperCase(), toLowerCase(), trim(), split(sep), replace(from, to), contains(text), startsWith(text), and the length property.

Your turn ​

Print the title in capitals, followed by how many characters it has, like PLENO IN PRACTICE (17 characters).

strings.pln
let title = "Pleno in practice"; // Print the title in capitals and its length.