• Všechny velikosti
  • Velké
  • Malé
  • Barevné
  • Černobílé
  • Jen barevné
Did you know the Logical AND Assignment?
There has been 2 kinds of Assignment Operators in JavaScript (besides the actual Assignment Operator =) Arithmetic Assignment Operators, like +=, *=, -=. Bitwise Operators <<=, >>>=, ^=, &=.
But there's a new kind of operators ready for you to use today in JavaScript, called: Logical Assignment Operators.
Today I'm going to show you Logical AND Assignment.
The logical AND assignment (x &&= y) operator only assigns if x is truthy.
The logical AND operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some falsy expression) && expr is short-circuit evaluated to the falsy expression;
Short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place).
Logical AND assignment short-circuits as well meaning that x &&= y is equivalent to:
x && (x = y);
And not equivalent to the following which would always perform an assignment:
x = x && y;
I explained this operator in more detail, on YouTube and Medium, wanna watch the video?⁣⁣⁣⁣ - Link in the bio 🔥⁣⁣⁣⁣ ⁣ Have any questions about web development?⁣⁣ - Ask away 💌⁣⁣ ⁣⁣ Wanna build a web app?⁣⁣ - Get in touch 👨‍💻⁣⁣ ⁣⁣ Want to support me in my journey?⁣⁣ - Leave a comment with good vibes.⁣⁣ - Tag a friend that might find my page @codingedgar interesting.⁣⁣ - Turn notifications to know when I publish new stuff.⁣⁣ - Destroy the like button. (both here and in YouTube, of course)⁣
#cssgrid #datastructure #fullstackdev #javscript #googlecloud #prague #jenkins #pilsen #stockholm #flexbox #webdeveloper #ostrava #brno #browser #hmtl5 #npm #opensource #uppsala #fullstack #jscripters #es6features #lifetocode #code_with_anna_strings #code_with_anna #programmerprogramming #codewithanna_strings #webmasterproject #codecrumbs #codewithanna #heroku
Did you know the Logical AND Assignment? There has been 2 kinds of Assignment Operators in JavaScript (besides the actual Assignment Operator =) Arithmetic Assignment Operators, like +=, *=, -=. Bitwise Operators <<=, >>>=, ^=, &=. But there's a new kind of operators ready for you to use today in JavaScript, called: Logical Assignment Operators. Today I'm going to show you Logical AND Assignment. The logical AND assignment (x &&= y) operator only assigns if x is truthy. The logical AND operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some falsy expression) && expr is short-circuit evaluated to the falsy expression; Short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place). Logical AND assignment short-circuits as well meaning that x &&= y is equivalent to: x && (x = y); And not equivalent to the following which would always perform an assignment: x = x && y; I explained this operator in more detail, on YouTube and Medium, wanna watch the video?⁣⁣⁣⁣ - Link in the bio 🔥⁣⁣⁣⁣ ⁣ Have any questions about web development?⁣⁣ - Ask away 💌⁣⁣ ⁣⁣ Wanna build a web app?⁣⁣ - Get in touch 👨‍💻⁣⁣ ⁣⁣ Want to support me in my journey?⁣⁣ - Leave a comment with good vibes.⁣⁣ - Tag a friend that might find my page @codingedgar interesting.⁣⁣ - Turn notifications to know when I publish new stuff.⁣⁣ - Destroy the like button. (both here and in YouTube, of course)⁣ #cssgrid #datastructure #fullstackdev #javscript #googlecloud #prague #jenkins #pilsen #stockholm #flexbox #webdeveloper #ostrava #brno #browser #hmtl5 #npm #opensource #uppsala #fullstack #jscripters #es6features #lifetocode #code_with_anna_strings #code_with_anna #programmerprogramming #codewithanna_strings #webmasterproject #codecrumbs #codewithanna #heroku
Při pokusu o sdílení polohy došlo k chybě
Více informací
odkazuje na služby nejen od Seznam.cz.

© 1996–2024 Seznam.cz, a.s.

3277/6022,3279/6027