[core][js] fix variable name