You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
function hasKey(obj, key) {
|
|
return obj != null && hasOwnProperty.call(obj, key);
|
|
}
|
|
console.log(hasKey({red: "#FF0000", green: "#00FF00", white: "#FFFFFF"}, "green"));
|