I want to have a loop with some properties of a class, not all of it's properties. I want to implement a function for properties of the class. But even I don't know how to set the length of loop with number of properties in class. For example this is my class:
class Address{
id: number,
street: string,
state: string,
}
and I want to make a loop with length of the object of this class and do something on each property of this object of Address class, something like this:
for (let i; i< /*length of address object*/; i++) {
if (/*each property of address */) {
// do sth
}
}
I'm using Angular 4. Thank you