Javascript syntax for abbreviating repeated access to same identifier -
I want to ask whether there is a formal way of describing the following code, through which we can re-open the same object without The object identifier typing can be accessed:
myObj.render (1) .render (2) .print ();
I was not told this when trying to make a question; I wanted to know if such a thing is possible in javascript or not, I know that I can do it in VB:
myObj.render (1) if (foo == 'bar' ) .render (2). Print ();
Thanks!
Your first example of which name you are looking for can be easily implemented in this way :
var obj = {rendere: function (arg) {// do something here ... come back; // key of the chains}, print: function () {warning ('print something ...'); }}; Obj.render (1) .render (2) .print ();
Basically the render
method is not possible to chanelity
conditionally you want to do , Then you will give something like this
Comments
Post a Comment