Returning Boolean Values from Functions, freeCodeCamp Basic Javascript

preview_player
Показать описание
In this challenge we learn about a common anti-pattern used by beginners a lot to check if a comparison is true or false. Since a comparison in javascript will automatically return either true or false, we need not create an if else statement to check it.
Рекомендации по теме
Комментарии
Автор

This simple explanation is the cleanest I've seen so far on YouTube...it makes complete sense. Other explanations seem to be convoluted and if you're a beginner you may just be confused. I'm glad I searched for multiple Boolean explanations and found this one. Also, this is the first time I've encountered the term 'anti-pattern'. I suppose it means bad coding practices. Unfortunately, the anti-pattern described here is what' I've come across on several channels on YouTube. Thank you sir, for enlightening me.

carlynesaintroc
Автор

Why is my boolean function returning integer. When I call it in println statement.

artofwrick
Автор

I don't understand why it speaks of === but then asks us to do <?

bysteveroe
join shbcf.ru