Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

help with writing javascript!!!?

ok, i am trying to make it so 3 prompt boxes show up, like this:

box 1: what is your name?

box 2: how old are you?

box 3: how many hours of sleep do you get?

now, how do i make it so it can divide age by sleep?

how can i get it to display answered name, plus the answer to the equation?

1 Answer

Relevance
  • 1 decade ago
    Favourite answer

    To divide use like this

    <script>

    a = "10"

    b = "100"

    c = a / b

    document.write(c);

    </script>

    <script>

    name = "ollie"

    surname = "kett"

    document.write(name + surname + "any text i want to add")

    </script>

Still have questions? Get answers by asking now.