<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>obj遍历</title> </head> <body> <script> var obj = {"a":1, "b":2, "c":3}; for(let key in obj){ console.log("key:", key); } // key: a // key: b // key: c </script> </body> </html>
js obj遍历.html
猜你喜欢
转载自blog.csdn.net/weixin_42193179/article/details/88734759
今日推荐
周排行