目录

How do I determine whether a JS object contains a specific value?

Use Object.values(objectName).indexOf(valueToCheck). If -1 is returned, the corresponding value is not included. Otherwise, the corresponding value is included.

var res = array.indexOf(val)