whenever i used forEach() i got this error in terminal
[ts] Property 'forEach' does not exist on type 'string'.
My application works in browser properly. Everything works properly but i don't want such errors in terminal.
I used below code for it. Please suggest me what i missing.
job.forEach(function(state) {
if((totalcarer['userId']+"")===state.rNo)
{
cjobState = state.cJobstatus;
}
});
arrays: string[];
arrayString: string;
See the diff between? one is array and another is string.
arrays.forEach(...) // valid.
arrayString.forEach(...) //invalid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With