Why does this work only without the brackets?

Why does this work only without the brackets?

function isEveryoneHere(userObj) {
 return ['Alan', 'Jeff', 'Sarah', 'Ryan'].every(name => 

If I put an opening and closing bracket like this it won’t work, it returns false:

(name => {
setup code

let users = {
Alan: {
  age: 27,
  online: true
Jeff: {
  age: 32,
  online: true
Sarah: {
  age: 48,
  online: true
Ryan: {
  age: 19,
  online: true

**Challenge:**  Check if an Object has a Property

**Link to the challenge:**

this function is not returning anything, you need a function that returns something

this function uses arrow function’s implicit return


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.