Python
obj = {
'name': 'Victor'
}
for key in obj:
print("key: %s, value: %s" % (key, obj[key]))
Enter fullscreen mode Exit fullscreen mode
Javascript:
let obj = {
name: 'Victor'
}
for (key in obj) {
console.log(`Key: ${key}, value: ${obj[key]}`);
}
Enter fullscreen mode Exit fullscreen mode
© 版权声明
THE END
暂无评论内容