showing results for - "for in loop key"
Eva
28 Jul 2020
1// if you want to get the 'value' of the key  you can do it this way
2const user = {firstName: 'John', lastName: 'Doe'}
3
4for(key in user) console.log(user[key]);
5// output : 
6// John
7// Doe