javascript - KineticJS enumerate data types of an Object -


the code below enumerate properties of object, can data types enumerated?

function enumerateattributes(node){     var text="";     var attrs=circle1.getattrs();     (key in attrs) {         if (attrs.hasownproperty(key)) {             text+=(key+"=="+attrs[key]+"\n");         }     }     alert(text); } 

for javascript data types can use typeof: console.log(typeof attrs[key]);

these common types returned:

  • null,
  • undefined,
  • object,
  • boolean,
  • number,
  • string,
  • function

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -