Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

initializing a property asynchronously 2

const dc = new DataContainer();
assert.equal(dc.getData(), 'DATA: undefined');
setTimeout(() => assert.equal(
  dc.getData(), 'DATA: downloaded'), 0);
Source by exploringjs.com #
 
PREVIOUS NEXT
Tagged: #initializing #property #asynchronously
ADD COMMENT
Topic
Name
4+3 =