scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Challenge - Shh... Whispering Function
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Challenge - Shh... Whispering Function
AboutCommentsNotes
Challenge - Shh... Whispering Function
Expand for more info
index.js
run
preview
console
/* Whispering function 
Write a function `whisper` that takes in a sentence
and returns a new sentence in all lowercase letters with
"shh..." at the beginning.

The function should also remove an exclamation point
at the end of the sentence, if there is one.

Example
input: "The KITTENS are SLEEPING!"
output: "shh... the kittens are sleeping"

Hint: endsWith and slice
*/

console.log(whisper("PLEASE STOP SHOUTING."));
console.log(whisper("MA'AM, this is a Wendy's!"));
Console
ReferenceError: whisper is not defined (/index.js:16)
,
/index.html
-0:43