Smokeball interview question

Simple JS coding challenge on Github