如何在JavaScript中写枚举var obj = {name:"张三",age:18}for(var key in obj){console.log("key:" + key + ",value:" + obj2023-02-18JavaScript550