js: better syntax