Quiz di JavaScript: Strings & Template Literals

This JavaScript strings quiz checks template literals and the everyday string methods. You will predict the output of slice, split, trim and at, and see that strings can't be changed in place.

Facile 10 domande ~5 minuti Superato con il 80% Node.js 22

Scegli una modalità

Stai giocando come ospite: accedi per salvare XP e serie.

Domanda di esempio

Domanda 1 di 10

What does this print?

const name = "Ann";
console.log(`Hi, ${name}!`);
Mostra la risposta

D. Hi, Ann! Inside backticks, ${...} is replaced by the value of the expression. With normal quotes the text ${name} would be printed as is.

Cosa copre questo quiz

  • Template literals with backticks and ${...}
  • Cutting strings with slice() and split()
  • trim(), toUpperCase() and at()
  • Strings are immutable
  • Searching with includes()

Domande frequenti

Serve un account?

No. Chiunque può giocare. Accedi per salvare XP, serie, badge e cronologia.

Posso rifarlo?

Sì. Il tuo miglior punteggio resta salvato, e domande e risposte vengono mescolate ogni volta.