sudo code for JS