Here is a collection of visual JavaScript tips and explanations that can help JavaScript developers of any skill level!
π§΅ππ»
The anatomy of a for-loop in JavaScript. ππ»
The anatomy of a while-loop in JavaScript. ππ»
The anatomy of a do-while-loop in JavaScript. ππ»
The anatomy of a for-of-loop in JavaScript. ππ»
The anatomy of Array map in JavaScript. ππ»
This is how you can combine a Promise and setTimeout to create a cancelable delay. ππ»
This is how you can make an argument required by using a function as a default parameter.
Whenever no argument is passed, the function fires and throws an Error that tells what went wrong. ππ»
The Performance API is actually way better suited to measure execution times than the Date API.
Please be informed that many browsers reduce the precision to prevent fingerprinting.
It's best to use it in your tests ran with Node! ππ»
You can unpack all nested arrays of an array by passing Infinity as an argument to Array flat.
This way, you get all individual values one after the other. ππ»
The nullish coalescing operator is often a better choice than using the logical OR operator.
Contrary to the logical OR, the nullish coalescing operator only reacts to null and undefined. ππ»
A destructuring assignment can save you a few lines of code, especially when you want to unpack multiple nested properties of an object. ππ»
You can usually not destructure into existing variables.
But by putting parentheses around the statement, you actually can! ππ»
You can also destructure arrays and extract individual values, as well as the remaining rest.
This is often more readable than accessing individual entries of the array. ππ»
You can get the last items of an array by using slice with a negative number.
This returns an array with the number of items you specified with the respective negative number in the order they are placed in the original array. ππ»
You can format the output of JSON.stringify by passing an indentation string as the third argument of the function. ππ»
And that's it for now.
I hope you found something useful for you! πππΌ
β’ β’ β’
Missing some Tweet in this thread? You can try to
force a refresh
We're going to look into what this offer actually includes and how we could build a containerized Lambda function ourselves. π¨π»βπ«
Start your IDEs and open your AWS consoles because we're going in!
π§΅ππ»
1οΈβ£ AWS Lambda Previous To Container Image Support
Until recently, AWS Lambda only allowed you to write some code and upload a zip archive containing all files necessary to run your function.
Some frameworks eased up this process, but that's how it went.
Lambda also imposed some pretty strict limits, especially the 50MB default deployment size limit.
You could technically circumvent this limit by pulling more deployment dependencies from S3 or issuing an AWS Service Limits support request. But this wasn't the most...