Practicing basic skills in javascript