JavaScript command line practice