diff --git a/challenge-3/submissions/AlexO-85/solution-template.go b/challenge-3/submissions/AlexO-85/solution-template.go index bdf46782..ec0ebc38 100644 --- a/challenge-3/submissions/AlexO-85/solution-template.go +++ b/challenge-3/submissions/AlexO-85/solution-template.go @@ -49,9 +49,9 @@ func (m *Manager) GetAverageSalary() float64 { // FindEmployeeByID finds and returns an employee by their ID. func (m *Manager) FindEmployeeByID(id int) *Employee { - for _, e := range m.Employees { - if(e.ID == id){ - return &e + for i := range m.Employees { + if(m.Employees[i].ID == id){ + return &m.Employees[i] } } return nil