3 ms·
Example of inconsistencies? comparing to what? If you're gonna cherry pick some outdated es5 to make that point, dont bother.
by nsonha 5y ago
Example of inconsistencies? comparing to what? If you're gonna cherry pick some outdated es5 to make that point, dont bother.
- makapuf 5y agoIterating over an object keys, an array or a map?
- kingdomcome50 5y agoI would expect, given you have described an operation on 3 different data structures using different words, that it would also demand 3 different kinds of syntax/denotation no? Your own language requires as much. Why not JS?
- makapuf 5y agoWell in python by example you use for x in myobject to iterate and that's it, no Object.entries(myobj) vs. mymap.entries , lua is even more consistent, ..
- deleted 5y ago[deleted]
- frankenst1 5y agolet obj = {a:1}, arr = [1], map = new Map().set("a",1); // Iterating over an object keys for (let x of Object.keys(obj)) {...} // an array for (let x of arr) {...} // or a map? for (let x of map) {...}