Created
February 6, 2020 05:56
-
-
Save b2977053/98f8ef4dd1bdab84aadd50886d93910b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New in Chrome 80 | Web | Google Developers | |
https://developers.google.com/web/updates/2020/02/nic80?fbclid=IwAR2nKXVG8kxLpJ2kgwVbLqYiAbEIXvGUMkeiuKFcQczVhgbHJoo470RyFww#opt-chaining | |
var ABC = function(){this.a = '123'} | |
ABC.prototype._fun1 = function(){return this.a.length} | |
ABC.prototype._fun2 = function(){return this.b?.length} | |
var abc = new ABC(); | |
abc._fun1() // 3 | |
abc._fun2() // undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment