logo CodeStepByStep logo

veryBestSong

Language/Type: JavaScript functions console output
Author: Melissa Hovik (on 2016/09/25)

Write a function named veryBestSong prints the following song to the console. Use helper functions to show structure and eliminate redundancy in your solution.

I wanna be,
the very best,
That no programmer ever was...
Every function along the way
With courage I will face...
JSLint, oh, you're my best friend
In a World Wide Web we must defend...

Variable scope errors! Gotta try-catch 'em all!
Those missing semi-colons won't stand a chance,
I'll win every function call...
Always debugging my JavaScript code,
I know it's my destiny...

Bug by bug we'll win the fight
But we'll leave be the Caterpie...
Use alerts when the time is right,
There's no better bug remedy...
JSLint, oh, you're my best friend
In a World Wide Web we must defend...

Variable scope errors! Gotta try-catch 'em all!
Those missing semi-colons won't stand a chance,
I'll win every function call...
Always debugging my JavaScript code,
I know it's my destiny...

I wanna be,
the very best,
That no programmer ever was...
Every function along the way
With courage I will face...
JSLint, oh, you're my best friend
In a World Wide Web we must defend...
        
Function: Write a JavaScript function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.