fix javascript typo for assignment