exercise #4.1 JS methods elaborated