[Solved] What is the reason of this error? How do I solve this? [closed]
[ad_1] You only declare obj, but you don’t initialize it. Change var obj: Uni; obj.uniName = responseData[i].UniversityNameOfUser; to let obj: Uni = { uniName: responseData[i].UniversityNameOfUser }; Note: Avoid using var. Use const (immutable) or let (mutable) instead. [ad_2] solved What is the reason of this error? How do I solve this? [closed]