我正在尝试获取所述对象中每个键的小写值。
for (each in {'foo':'bar','bar':'foo'}) {
console.log(typeof each, each.toLowercase());
}
我得到的错误是Object foo has no method 'toLowercase'
,但typeof each
返回'string'
我正在尝试获取所述对象中每个键的小写值。
for (each in {'foo':'bar','bar':'foo'}) {
console.log(typeof each, each.toLowercase());
}
我得到的错误是Object foo has no method 'toLowercase'
,但typeof each
返回'string'