Sleep Debt Calculator

Hello guys!

Learning JS and I love it!)

In the Sleep Debt Calculator I don’t understand why in this snippet we don’t use curly braces {}

const getActualSleepHours = () =>


  • getSleepHours(‘tuesday’)

  • getSleepHours(‘wednesday’)

  • getSleepHours(‘thursday’)

  • getSleepHours(‘friday’)

  • getSleepHours(‘saturday’)

  • getSleepHours(‘sunday’);

Thank you very much in advance and have a great day!

Assuming those bullets are plus signs, the entire expression is one value.

const foo = () => expression;

Given there is but a single expression then the braces can be left off, and the return given to be implicit.

1 Like

thank you, mate! good luck!

1 Like