📜  for in 循环键 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:40.277000             🧑  作者: Mango

代码示例1
// if you want to get the 'value' of the key  you can do it this way
const user = {firstName: 'John', lastName: 'Doe'}

for(key in user) console.log(user[key]);
// output : 
// John
// Doe