我有一个
javascript对象
var obj = { "0" : "apple","1" : "pear","2" : "orange" }
我想检查对象中是否有“橙色”.
有内置的功能吗?还是应该迭代obj的每个值?
谢谢.
var obj = { "0" : "apple","1" : "pear","2" : "orange" }
我想检查对象中是否有“橙色”.
有内置的功能吗?还是应该迭代obj的每个值?
谢谢.