• Sunday , 26 January 2020

Javascript Tutorial – Using the prompt() and Number() functions

Code Canyon

Original source

3d Ocean

Related Posts


  1. LazyBones
    August 3, 2019 at 03:05

    Im new to javascript. I have to use prompt to ask a series of 10 yes or no questions. Each question is 5 points. How do I add them up? The user will input 'yes' meaning 5 points and 'no' being 0 points. How do I go about that? How would I make the word 'yes' translate into 5 points in the code and then add up all the answers of the 10 questions?

  2. Urbansumo
    August 3, 2019 at 03:05

    Number() solved my problem, thank you for this video!

  3. Elijah Bentley
    August 3, 2019 at 03:05

    An easier way to add variables correctly is add a "+" in front of the variables

    var firstNumber = 5;
    var secondNumber = 5;

    var sum = +firstNumber + +secondNumber;

    //sum is now equal to 10

  4. SuperJJMan189
    August 3, 2019 at 03:05


  5. sangeeta maurya
    August 3, 2019 at 03:05


  6. Charley Brown Junior
    August 3, 2019 at 03:05

    what is he writing in?

  7. Suraj Vishwakarma
    August 3, 2019 at 03:05

    thsnk you very much

  8. Công Trí Trương
    August 3, 2019 at 03:05

    tks for the video! One small question, I have 4 prompts with 4 questions and I want browser shows the answers after each questions. continously, at the end I have 4 answers' shown on browser. How can I do that!?

  9. Anamika Sandhya
    August 3, 2019 at 03:05

    Hi can u help me ..I want to create an authentication prompt..in that prompt browser and tab will not close until type correct password and user name..plz help me

  10. Hakim Boudiba
    August 3, 2019 at 03:05

    thanks for your video , you provide an easy way to learn , however please i want to set a factorial function like 5!=5*4*3*2*1 , i found on stackoverflow  many functions ,but are really difficult to understand , would you like please to give us a simple solution regarding factorial please , and thank you by the way

Leave A Comment

You must be logged in to post a comment.