JSFiddle - React, Tailwind, and code Playground
by ptubig
JavaScript
var Images = {
load: [
'1.png',
'2.png',
'3.png'
],
// Get the list of images to load
getImages: function() {
return this.load;
}
};
// What will the result of each be?
alert(Images.getImages());
// What will the result be here?
var getter = Images.getImages;
alert(getter());
// This is how you would duplicate Images.getImages.
alert(getter.call(Images));