Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wisePerson(wiseType, whatToSay) {
- return `A wise ${wiseType} once said: "${whatToSay}".`;
- }
- MY ANSWER
- function shouter(whatToShout) {
- return whatToShout.toUpperCase() + !!!;
- }
- REAL ANSWER
- function shouter(whatToShout) {
- return `${whatToShout.toUpperCase()}!!!`;
- }
- (didn't put the ticks around)
- MY ANSWER
- function textNormalizer(text) {
- return text.toLowerCase().slice(0, text.length - 1)
- }
- textNormalizer(" let's GO SURFING NOW everyone is learning how “)
- REAL ANSWER
- function textNormalizer(text) {
- // chaining together method calls like this is called
- // *method chaining*
- return text.toLowerCase().trim();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement