Coffeescript returns the last line always, all you needed to do was add a &#x27;return null&#x27; (or just &#x27;return&#x27;) as the last line in the function.<p>You have to be explicit in Vanilla JS to return things or it just return null. Coffeescript explicitly returns the last line every time.