on 06-20-2019 3:10 PM
Hi all,
could anybody please explain the notation bracket followed by curly bracket.
When do we have to use it?
Example - in second line : new sap.m.Image({
sap.ui.getCore().attachInit(function () {
var oImage = new sap.m.Image({
src: "img/UI5_logo.png",
decorative: false,
alt: "SAPUI5 Logo"
}).placeAt("content");
Thanks, regards
Mario
Hi Mahesh,
many thanks. But the samples you provided all contain combinations like
(){}
But my question differs:
({})
I cannot find an explanation in the www.
Do you have an explanation?
thanks
Regards
Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It means u are passing an JSON object to a class constructor when instantiating it. See the documentation below
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects
Or it can be that you are calling a function and passing object to it like Jun said
https://stackoverflow.com/questions/7764536/pass-object-to-javascript-function
User | Count |
---|---|
75 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.