Deferred Promise - Javascript Language Basics

Javascript examples for Language Basics:Promise

Description

Deferred Promise

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//from  w ww.j  a  va  2 s .  c o  m
var arr = ['A', 'B', 'C'];
arr.color = 'red';
var values = [];
for(var i in arr) {
    if(arr.hasOwnProperty(i)) {
        values.push(arr[i]);
    }
}
console.dir(values);
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials