DEV Community

Discussion on: Think Like a Programmer??

Collapse
 
cat profile image
Cat

HAHA order of operations and specificity.

I remember when I was first learning JS, my friends told me this little anecdote emphasizing the importance of "return"

"You give your roommate a list of things to do:

  • get a pizza
  • paint the door red

At the end of the day, he returns with nothing.
But hey, you got a red door."

You didn't specify if he had to RETURN HOME WITH THE PIZZA so... ¯_(ツ)_/¯

Collapse
 
scottishross profile image
Ross Henderson • Edited

That's a great way to remember specificity, thanks!