« first day (2246 days earlier)      last day (1856 days later) » 

BOZ
3:38 AM
Hi, in the one function use new constructor(); Is it a suitable method?


`var oneName = (function() {

var anyName = {};

anyName.propertyName = function(a) {
return new PROPERTYNAME(a);
}

var PROPERTYNAME = function(d) {
this.show = function() {
return d;
}
}

return anyName;

});

console.log(oneName().propertyName("b").show());`
 
1 message moved from JavaScript
 
 
1 hour later…
 
3 hours later…
7:44 AM
10 messages moved from GMTs
 
 
2 hours later…
12:33 PM
class def {
constructor(abc) {
this.abc = new abc();
}
}
 
1 message moved from JavaScript
 
 
2 hours later…
 
1 hour later…
 
2 hours later…
 
1 hour later…
8:52 PM
var someJSON = async function() {
const result = await $.getJSON( jsonURL, {
userId: 22
})
.done(function( json ) {
console.log('json thing ', JSON.stringify(json));
return json
});
console.log("here is result of thing ", JSON.stringify(result, null, 4) );
}


var getResortJson = function() {
someJSON();
var blue = someJSON();
console.log('here in the resort json ', JSON.stringify(blue));
}
 
1 message moved from JavaScript
 

« first day (2246 days earlier)      last day (1856 days later) »