Skip to content

IE11 partially supports new Map(iterable)#691

Merged
Elchi3 merged 2 commits into
mdn:masterfrom
nhunzaker:master
Dec 4, 2017
Merged

IE11 partially supports new Map(iterable)#691
Elchi3 merged 2 commits into
mdn:masterfrom
nhunzaker:master

Conversation

@nhunzaker

Copy link
Copy Markdown
Contributor

While IE11 does not support the iterable API, you can create Maps by passing an array of key/value pairs. For example:

var map = new Map([ ['foo', 'bar'] ])
map.get('foo') // 'bar'

While IE11 does not support the iterable API, you can create Maps by passing an array of key/value pairs. For example:

```
var map = new Map([ ['foo', 'bar'] ])
map.get('foo') // 'bar'
```
@teoli2003 teoli2003 added the data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript label Dec 4, 2017
@Elchi3

Elchi3 commented Dec 4, 2017

Copy link
Copy Markdown
Member

Should the note then say "Only supports arrays of key/value pairs, such as new Map([ ['foo', 'bar'] ])." ?

@nhunzaker

Copy link
Copy Markdown
Contributor Author

Great idea. That's quite a bit clearer. Done.

@Elchi3 Elchi3 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants