0

Tengo una duda sobre el entries()

let map = new Map([['k1', 'v1'], ['k2', 'v2']]); for (let kv of map.entries()){ for (let ki of kv.entries()){ console.log(ki); } } Este ejemplo no deberĂ­a mostrar en la consola todos los valores de map. ÂżDonde estoy errado?

16th Jan 2020, 3:14 PM
David Guédez
David Guédez - avatar
1 Answer
0
David GuĂ©dez , I think you don't need in the second for loop "entries()" to show all the values. Look at the code đŸ± https://code.sololearn.com/WiMcZoiHVrKs/?ref=app
16th Jan 2020, 3:42 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar