finish JS section on functions