2021-08-28

accessing whether a value is an Object or not

how can i know if a value is in my object in Js, I don't know how to explain it exactly but I hope the code simplifies it for you

let object = {
  1: hey
  2: hi
  3: hello
}
let exist = object.value("hello")
console.log(exist) //should print true


from Recent Questions - Stack Overflow https://ift.tt/2XUvzmq
https://ift.tt/eA8V8J

No comments:

Post a Comment