I have the following code, i'm using Typescript:
interface User {
email: string
password: string
}
const user : User = {
email: 'foo@bar.com',
password: 'foo'
}
for (let prop in user) {
// how to get key and value destructuring
}
How do I get the property and the value of my object in two variables?