using forEach method