Advanced functions

Why messing with Ifs and elses, when you can just return the condition:

const plantNeedsWater = function(day) { return (day==='Wednesday') }

2 Likes

Because before we can run, we need to learn how to walk. Learning program logic is not as simple a task as one might think. First we master the naive, then we explore the abstract.

3 Likes