1๏ธโฃ Switch Statement
Finds the matching value of an expression and executes the code block associated with the matching value.
2๏ธโฃ Ternary Operator
Checks a condition and executes the first expression if the condition is true. Otherwise it runs the second expression.
3๏ธโฃ Jump / Dispatch Table
Stores value-function pairs in an object to quickly fetch and run a function based on a value (which is treated as an object key).
4๏ธโฃ Dynamic Dispatch
This pattern involves selecting which polymorphic method to call based on an objectโs type.
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐40โค11๐1๐1
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐29โค9๐ฅ9
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐22โค7
๐
Learning the JavaScript Language
๐ Author: Joe Chellman
๐ฐ Level: Beginner
โฐ Duration: 4h 7m
๐ Topics: JavaScript
๐ค Join Learn JavaScript for more courses
๐ Gain a conversant understanding of JavaScript, including variables, types, objects, arrays, operators, control structures, loops, and functions.
Please open Telegram to view this post
VIEW IN TELEGRAM
๐20โค17
Please open Telegram to view this post
VIEW IN TELEGRAM
๐19โค16
I know I know, you probably won't ever need to swap two variables. But this is a cool demonstration for how the destructuring assignment works in JavaScript.
This syntax is used to take an array or items in the right hand side and assign them to correspondingly positioned variables in the left hand side.
๐ We use that here to assign b to a, and a to b.
This syntax is used to take an array or items in the right hand side and assign them to correspondingly positioned variables in the left hand side.
๐ We use that here to assign b to a, and a to b.
๐41โค7