var obj = { name: 'John doe', age: '25' } for (prop in obj) { console.log(prop) // Gives back 'name' and 'age' }