Having trouble with 'while' loop in javascript

前端 未结 3 645
长发绾君心
长发绾君心 2021-01-28 18:55

I\'m new with javascript, and I\'m having some trouble understanding why this code doesn\'t execute:

var weight;

wight=parseInt(prompt(\"Please, enter weight\")         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-28 19:16

    spelling of weight :

    while (wight>0);
    
    while (weight>0);
    

    also in

    document.write("Tax will be" + wight*10);
    
    document.write("Tax will be" + weight*10);
    

提交回复
热议问题