updated JavaScript Assignment