array.indexOf would be more appropriate here than using forEach.