write js on browser like nodejs