My second homework in js