You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tania Shatilova edited this page Nov 10, 2015
·
1 revision
The dictionaryForEach() method executes a provided function once per dictionary element.
The dictionaryForEach() method executes only for own properties of an object.
Parameters
dictionary - object that structured like a dictionary, for example, {a: 1, b: 2}.
callback - function to execute for each element, taking two arguments:
key - the current element's key being processed in the dictionary, and
value - the current element's value.
Examples
vardict={a: 1,b: 2};functionlogDictionaryElements(key,value){console.log("key = "+key+"; value = "+value);}Mint.utils.dictionaryForEach(dict,logDictionaryElements);// logs:// key = a; value = 1// key = b; value = 2