Does ECMA 5 supports Map & Set & List collections?
Preferred approach to define and iterate Map and Set in Aura? - I think we have to use objects for Maps like:
but how to use create a set and use in java script?
You construct them as normal:
let myMap = new Map();
let mySet = new Set();
Check out the MDN documentation on how to use Map and Set, including constructors and special rules for their use.
Because of how the compiler works, you're technically allowed to use any script supported by the browser, even the latest in ECMA features, but Aura only formally promises ECMA 5 and ECMA 6 Promises (and nothing newer). It is recommended that you strictly keep to ECMA 5 and Promises in Aura, and use LWC if you want to support newer features.
Please I need a clear difference between ECMA5 and 6 collections usage in Aura. Not able to clear understand the collections usage in aura.
ECMA 5 collections are officially supported, ECMA 6 collections are supported only if the browser supports them. Of course, this should only be a problem if you still need to support IE 11, which nobody should be using these days (but some people still are...).