There is an array of objects with the fields name, phone. I want to convert the values in the phone field through the loop into a string. Only numbers are contained there. Tried both String () and .toString (). and + "".
for (index in contactList){ contactList[index].phone = String(contactList[index].phone); console.log(typeof contactList[index].phone); } console.log(contactList); In the loop it displays that the format is String. But when I display the entire array, the phone is displayed in a number. https://gyazo.com/e5a4d1c84e820aa9c167aff0e6f81aa5