Recorrer un objeto Javascript

Cuando tenemos un objeto podemos recorrer sus propiedades utilizando un bucle con in:


for (var campo in usu0 ){
    //campo va tomando los nombres de las propiedades
    document.write( usu0[campo] + '\t');
}

One Response to “Recorrer un objeto Javascript”

  1. 2012 Fashion ideas m…

    Nobody in life gets exactly what they thought they were going to get. But if you work really hard and you’re kind, amazing things will happen….

Leave a Response

You must be logged in to post a comment.