Page 1

@Javascript_easy   Faire le point 1    Create a variable called number_choosed ?    var number_choosed ;    Ask the human “ please choose a number” and put this number in number_choosed number_choosed = prompt (“Please choose a number human : “) ;    What’s the the type of number_choosed ? a) string b) number How to fix this ? we want number_choosed to be string type ? a) function parseInt() b) dunno Re-write the good code number_choosed = parseInt( prompt (“ Please choose a number  human : “) );     We want to display if for example the human entered the number 7 “You have choosed number 7 , good choice !” which function will we use to display something ? a) alert() b) prompt() What operation do we need to put the number_choosed variable ? a) concatenation + b) Division


Write the good code ? alert ( “ You have choosed number “ + number_choosed + “ , good  choice !” ); 

Exercise   Write a code that ask the human to choose a number N (integer) and display the number N+1   

Chooosed number  
Read more
Read more
Similar to
Popular now
Just for you