Create solution.js

Javascript version