obj.B in this example:
var obj = {
A: function(arg) {
//...
}
B(arg) {
//...
}
}
In firefox (79), obj.A and obj.B are identical. In IE 11, obj.B is a syntax error. I want more compatibility info but have failed to find anything about this syntax because most search engines ignore "punctuation". I keep hitting tutorials about functions in general or arrow operators.
This does appear somewhat similar to the arrow operator, with the notable difference that, unlike a named arrow function, this syntax does create a scope, pointing this
to obj
when called like obj.B()
Could anyone tell me what versions of other browsers this works in, or at least a searchable name for this function abbreviation?