Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
Yes, arrays are objects, but both are valid syntaxes and worth sharing.
In terms of the function I’d invite you to look directly at the proposal github.com/tc39/proposal-optional-....
The idea is that FunctionDoesNotExist is null, undefined or not a function. Using ?.() to call it will prevent an error from being thrown.
If you’re saying that is not being declared at all will still throw an error then you’re correct and I could be more clear about that.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, arrays are objects, but both are valid syntaxes and worth sharing.
In terms of the function I’d invite you to look directly at the proposal github.com/tc39/proposal-optional-....
The idea is that FunctionDoesNotExist is null, undefined or not a function. Using ?.() to call it will prevent an error from being thrown.
If you’re saying that is not being declared at all will still throw an error then you’re correct and I could be more clear about that.