Compare Revisions

Map

Revision 513515:

Revision 513515 by arai on

Revision 513621:

Revision 513621 by arai on

Title:
Map
Map
Slug:
Web/JavaScript/Reference/Global_Objects/Map
Web/JavaScript/Reference/Global_Objects/Map
Tags:
"ECMAScript6","JavaScript"
"ECMAScript6","JavaScript"
Content:

Revision 513515
Revision 513621
nn113          </td>
114        </tr>
115        <tr>
116          <td>
117            <code>myMap.forEach(callbackFn[, thisArg])</code>
118          </td>
119          <td>
120            {{ fx_minversion_inline("25") }} Calls callbackFn onc
 >e for each key-value pair present in the map object, in insertion
 > order. If a thisArg parameter is provided to forEach, it will be
 > used as the this value for each callback.
nn224 
225myMap.forEach(function(value, key, myMap) {
226  alert(key + " = " + value);
227})
228// Will show 2 alerts; first with "0 = zero" and second with "1 =
 > one"
nn359          <tr>
360            <td>
361              Map.forEach()
362            </td>
363            <td>
364              {{ CompatNo() }}
365            </td>
366            <td>
367              {{CompatGeckoMobile("25")}}
368            </td>
369            <td>
370              {{ CompatNo() }}
371            </td>
372            <td>
373              {{ CompatNo() }}
374            </td>
375            <td>
376              {{ CompatNo() }}
377            </td>
378          </tr>
tt474            </td>
475            <td>
476              {{ CompatNo() }}
477            </td>
478            <td>
479              {{ CompatNo() }}
480            </td>
481            <td>
482              {{ CompatNo() }}
483            </td>
484          </tr>
485          <tr>
486            <td>
487              Map.forEach()
488            </td>
489            <td>
490              {{ CompatNo() }}
491            </td>
492            <td>
493              {{CompatGeckoMobile("25")}}

Back to History