homework 3 (basic js)