Now I Lay Me Down To Sleep as a JavaScript program