@@ -112,7 +112,7 @@ let kwds2 =
h
let valid_js_ident s =
- try
+ String.length s > 0 && try
for i = 0 to String.length s - 1 do
match String.unsafe_get s i with
| 'a'..'z' | 'A'..'Z' | '$' | '_' -> ()
@@ -149,7 +149,6 @@ map.exists(c) == true;
map.get(b) == null;
// [] access
-/*
var map = new Map();
map["foo"] == null;
map["foo"] = 12;
@@ -165,4 +164,5 @@ map[(function(s) return s + "o")("fo")] == 1;
map["bar"] = map["foo"] = 9;
map["bar"] == 9;
map["foo"] == 9;
-*/
+
+['' => ''].keys().next() == '';