#es2020

JavaScriptBuzzJavaScriptBuzz
2026-01-20

Optional Chaining ?. vs Null Coalescing ??: GAME CHANGER!

JavaScript's ?. operator vs PHP's ?? operator - which saves more lines of code? INSANE!

youtube.com/watch?v=7FcbUHkVC1s

JavaScriptBuzzJavaScriptBuzz
2026-01-14

Nullish Coalescing vs Walrus Operator: Modern Operator Face-Off

JavaScript ?? operator vs Python := walrus operator. Which language's modern operator is more useful? This comparison is INSANE!

.8

youtube.com/watch?v=9ZiNZGWBdw8

2025-04-19

Understanding the JavaScript Nullish Coalescing Operator: A Comprehensive Guide
Learn how to troubleshoot null values in JavaScript using the powerful Nullish Coalescing Operator! This ES2020 feature makes your code more concise and robust when dealing with potentially missing data. Get the details now!
tech-champion.com/programming/...

2025-03-29

Understanding the JavaScript Nullish Coalescing Operator: A Comprehensive Guide
Learn how to troubleshoot null values in JavaScript using the powerful Nullish Coalescing Operator! This ES2020 feature makes your code more concise and robust when dealing with potentially missing data. Get the details now!
tech-champion.com/programming/...

2023-08-28

I had not remembered that I did actually already create one #BigInt #kata to learn the basics of it.

In #ES11 or #ES2020 or just #JavaScript 2 years ago it was released. Wanna learn it too? Feel free to fix some failing tests and hopefully learn actively how BigInt works.

jskatas.org/katas/es11/languag

#jskatas

BigInt: Basics
A BigInt can represent numbers larger than number

A BigInt is a large number 
a number: Number.MAX_VALUE * Number.MAX_VALUE, is useless, it results in Infinity
a bigint: BigInt(Number.MAX_VALUE) * BigInt(Number.MAX_VALUE) results in an amazingly large AND usable number
the result of BigInt(Number.MAX_VALUE) * BigInt(Number.MAX_VALUE) has 617 digits
creating one can be done in multiple ways 
adding an n at the end of a number
calling the function BigInt(x), where x is a number
calling the function BigInt(x) with a string
calling the function BigInt(x) with a binary number
difference to a number 
a BigInt is of type "bigint"
comparing via == can coerce a bigint to a number
but type safe comparisons fail
a bigint can NOT be used with Math.* functions
can not be calculated with a number
BigInt supports various operators 
the + and - work just like for numbers
also * and / work
the modulo operator % works as known
the exponentiation operator ** works like on numbers
but ++ even throws a SyntaxError
the comparison operators work, even with numbers 
comparing 2n >= 2 works as if they were of the same type
the number can also be the left operand 1 < 2n, works as if they were the same type
explicit type conversion 
via String(0n) renders the number without a trailing n
for Boolean(0b01n) everything but a 0 zero is true
the API 
BigInt is NOT a constructor, it throws
BigInt.asIntN() returns a bigint that can fit in the given number of bits
BigInt.asUintN() uses the g...

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst