lege javascript