INTRODUCTION😎
ECMAScript is a part of JavaScript language which is mostly used in web technology, building websites or web apps. ECMAScript is gr...
For further actions, you may consider blocking this person and/or reporting abuse
why are they making it more complicated?
Hey Ouzkagan,
Some features like Numeric Separators are most awaiting features in JS, these make code more readable.
I too think that things like
x &&= 10
could appear more convoluted for other programmers who look at the code. I would just not use the feature to keep things straightforward.A solution where there was no problem. Just because you can add a feature doesn't mean you should!
If you don't understand the purpose of that and try use, it's really complicated, but after some days you will see that feats will optimize your coding time
JavaScript is and will be backwards compatible. If you don't have a use for the new features, the old ways will still be present. The new tools are available if you find a use case.
In a not-so-near future, it could be used and useful for minifiy process improvements !
Kkkkkkkkkk I thought the same. But that X ??= 10 is really cool.
Can you have public counterparts to private properties?
E.g.
Or is JS
to primitive to handle itkeeping its logic simple?Yes, we can have public getter function to get a private properties.
I'm specifically referring to them sharing the same name, so the getter can let you do
.priv
without just giving you (direct) access to.priv
.Ok, your example is correct. In new update now we can make getter function also private so that it can only be accessed inside the class, but priv in your ex can be get from outside.
Try putting the code in
backticks
, it makes it more readable.Updated!
Nice post and nice features! It's funny how these simple features may make out lives that much easier. Each week there are at least 2-3 cases when I use3 the x = x || 10 syntaxes, and I think that the new operator will make the code more readable. We had x += 10, x*=10, and why not to have x ||= 10 :D. That's interesting how workarounds people used for writing shorter code are becoming a part of the language specification. I wonder how people coming from other languages will react to these operators :) Not speaking about the res, because there are helpful, too!
5 mb storage 1956
But nowadays things completely changed..
Same going with these programming languages. 🙂
Excellent write up. Thank you!
Welcome David 😊
When this release is available, how do we update in order to make use of these really helpful features? Will it just be part of my IDE updates?
You just update your code and hope that your clients upgrade their browsers as well :) Cheers mate!
Hey Joel,
JavaScript not requires update as it works in browser, only your browser should support the new ECMA version features. Make sure you works on Chrome browser.
I have mixed feelings with the nomenclature of the private class methods, I mean the feature is great I used it in TS but I would rather write really private than a symbol :D
Ya, it has more clear meaning.
Error here, it should be // Output: x = 1; Output: a = 10 prntscr.com/17suwls
Or
let x = 1;
if(x){
x = 10;
}
Corrected, sorry for mistake. Thank u 😀