var imgs = {
a: function(){
//...
},
b: function(){
//...
},
c: function(){
//...
}
};
var preloadImgs = function(){
imgs.a();
imgs.b();
imgs.c();
};
preloadImgs();
Is there a way to automate preloadImgs so it loads all the methods inside imgs at once, instead of me having to type every single one?
imgsan array? Wouldn't it be simpler?imgsvalues. Please share your attempt first.