Create javascript.js

Code snippet taken from a mini side project/experimentation of mine.