passing blocks around in javascript without lengthy function syntax -
passing blocks around in javascript without lengthy function syntax -
in testing code, i'm getting lot of things this:
test.truth(function(){return mytest.isdef('')}); where bulk of line there function boilerplate. there way cut down that, can have syntax more like:
test.truth { mytest.isdef('') } as 1 in scala?
of course, ideally highly browser compatible.
no, sorry. javascript has array literals - [] , object literals - {}, function literals possible using function() { } syntax
javascript
Comments
Post a Comment