MediaKeyStatusMap: forEach() method
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2019.
TheforEach() method of theMediaKeyStatusMap interface calls callback once for each key-value pairin the status map, in insertion order. If an argument is present it will be passed tothe callback.
In this article
Syntax
js
forEach(callbackFn)forEach(callbackFn, thisArg)Parameters
callbackFnFunction to execute for each element, taking three arguments:
currentValueThe current element being processed in the array.
indexOptionalThe index of the current element being processed in the array.
arrayOptionalWhich array
forEach()is being applied to.
thisArgOptionalValue used as
thiswhen executingcallback.
Return value
None (undefined).