First draft of Javascript example