JavaScript, does that property exist? - ES13
Vložit
- čas přidán 9. 07. 2024
- In this JavaScript Tuesday, we look at .hasOwn() added in EcmaScript 2022 (ES13). It is a nice replacement to the very LONG Object.prototype.hasOwnProperty and has two use cases: 1. when you need to check for a property and a ! won't do the trick (truthy and falsy). 2. when you are checking for inheritance and you don't want to use the old workarounds, An absolute must brevity and modern JS ! Make sure to hit subscribe and never miss a JavaScript Tuesday release!
Code: github.com/robertbunch/es-next
History of ECMAScript/JavaScript (long) - • Visual Timeline of Jav...
History of ECMAScript/JavaScript (shorter) - • Visual Timeline of Jav...
ES playlist: • EcmaScript Updates
0:00 - Intro
0:30 - Docs
3:31 - Code Example: Use Case 1
5:45 - Code Example: Use Case 2 - Věda a technologie