I am trying to code this in ES6. Below is what I am trying to achieve. Let\'s say I have an array of objects called schools.
schools
let schools = [ {na
I wonder how come none of the answers give simple solution
const editSchoolName = (schools, oldName, newName) => schools.map(school => { if (school.name === oldName) school.name = newName; return school; });