Can you hack this? #1
Alfredo Salzillo
Posted on March 10, 2021
Say that we have a function called nameEqualsToItself
how accept a person
object as input that checks if the name property of the input object equal the same name property of the input object implemented like this:
const nameEqualsToItself = (person) => person.name === person.name
Can you find the input that makes nameEqualsToItself
return false
?
const personX = ???
console.log(nameEqualsToItself(personX)) // print `false`
💖 💪 🙅 🚩
Alfredo Salzillo
Posted on March 10, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.