can someone, please explain the following:
I'm following Dan Abramov's lectures & doing the exercises.
The code works fine, however, the tests fail when the following particular function is written with curly brackets **{ }**
.
case 'toggleTodo' :
return (
state.map( (one) => {
oneTodo( one, action )
})
);
The same code works fine without curly brackets.
case 'toggleTodo' :
return (
state.map( (one) =>
oneTodo( one, action )
)
);
Here is the JsBin. Please refer to line 31 onwards.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…