Short-circuit evaluation happens when using conditionals with && or ||. The second argument is only evaluated when the first argument is not enough to determine the value of the expression. Learn some tricks using short-circuit evaluation in JavaScript.
Code:
🔗 http://codepen.io/beaucarnes/pen/jyGY...
More info:
🔗 http://www.jstips.co/en/short-circuit...
Beau Carnes on Twitter: / carnesbeau
⭐JavaScript Playlists⭐
▶Data Structures and Algorithms: • Data Structures and Algorithms - Beau teac...
▶JavaScript Basics: • JavaScript Basics Course
▶Design Patterns: • Design Patterns - Beau teaches JavaScript
▶ES6: • ES6 - Beau teaches JavaScript
▶Clean Code: • Clean Code - Beau teaches JavaScript
-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.
Join our community at https://freecodecamp.com
Read great tech articles at https://medium.freecodecamp.com
❤️ Support for this channel comes from our friends at Scrimba – the coding platform that's reinvented interactive learning: https://scrimba.com/freecodecamp