Hi I've got follow object:
arguments = {
familyName: undefined,
givenName: undefined,
age: undefined
};
I would like to loop each and do something with each key:value. I tried it like this:
this.arguments.forEach((item:any) => {
if(item == undefined) {
alert("Hallo");
}
});
Is it possible to loop it like this? I won't a normal for
or I'm not searching for such a solution, my question is if it is possible to loop it like in my forEach()
above, and if it's possible how to do this. I use it often in arrays and it works, so I thought perhaps it's also possible in such an object.
Thanks