All challenges
ProgrammingWrite codeBeginner4 min
Shout it
Skills: Strings · Functions
Task
Write
shout(text). It returns text in capital letters with ! added at the end: shout("hi") returns "HI!".Examples
Run examples tries these. Check solution also runs 3 more tests.
- A short wordExample
- Call
- shout("hi")
- Expected
- Returns "HI!"
Every test, including the extra ones, is part of this page. Nothing is hidden or secret.
Your code
Loading the editor…
function shout(text) {
}
Ctrl + Enter (⌘ + Enter on a Mac) runs the examples; add Shift to check. Tab indents; press Esc, then Tab, to leave the editor.
Run examples tries your code on the examples and records nothing. Check solution runs every test and saves an attempt.
Tests
Run your code to see which tests pass.
Console
What your code logs with console.log appears here.