Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Exercise 18 - contains

Write a function that searches for a value in a nested object. It returns true if the object contains that value.

Objects are compared by reference.

Examples:

contains({ foo: "foo" }, "bar") // false
contains({ foo: { bar: "bar" } }, "bar") // true