Answers for "how to push an object into an array typescript"

0

how to push an object into an array typescript

const places: { city: string; country: string }[] = [];

places.push({ city: 'Nairobi', country: 'Kenya' });
Posted by: Guest on March-28-2022

Code answers related to "how to push an object into an array typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language