Outputting JS in Codepen

First of all, when you post code, enclose it in back ticks to make it look good. If you are doing a block like above, use three back ticks on the line before the block, and three on the line after. The back tick key is usually below the ESC key.

Looking at your code, when I run it in my codepen it runs fine. The problem is that it outputs nothing so you have no idea that it is running. The statement titleCase("I'm a little tea pot"); runs the function and returns the results to … well … nowhere. Usually we do a console.log statement and see the output in the console. Replace the last line with console.log(titleCase("I'm a little tea pot")); This will now send the output to the console.

There are two consoles. There is one built into codepen - you can click “console” at the bottom of the window and expand that pane. But most coders prefer the browser console, usually opened with ctrl-shft-j.