Message from JavaScript discussions

May 2019

— everyone


Then can someone give me regex for| and not|

— Whats the construct that allows object declaration and method invocation in the same instruction?


var a = {

sur4a: function () {

return 'W'


rich6: '109'

} ['sur4a']();

— I’m sorry, wtf? This code is illegible because is a web pack bundle. Are you trying to modify a web pack bundle directly?

Message permanent page

— Yes Chris, I don't have another source for that code 😅

— I think it’s Expressions
According to the MDN:
| An expression is any valid unit of code that resolves to a value.

Creating an object is an expression, and will return value, then with [‘sur4a’] you’re asking for the property of the previous value and that’s an expression, which happen to be a function, then with () you’re executing this function which also happen to be an expression.

Message permanent page

— Oh, it’s too much code to be understandable.

— Yep, at least I identified the function I need to run

— I tried to read your code but I wasn’t capable of detecting what’s wrong

— Who know django well here ?

— Thanks...thats very well explained