[JS] eliminate var_exists altogether, it is exactly similar to var_get