Added: 10 months ago
From: thenewboston
Views: 10,673
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (22)

Sign In or Sign Up now to post a comment!
  • @dino0x

    Thanks, I had it capitalized in my code, I just didn't type it in the comments correctly. Turns out javascript wasn't working for me in any browser, I had to restart my computer, then delete and remake all my training files from scratch. I don't know what happened exactly.

  • document.write(math.pi); does not work for me at all. I've checked all of my code about a hundred times, it does not write anything on the screen.

  • @slandshark dude, javascript is case sensitive. The correct usage is Math.PI

  • can't you make the prompt ON the page and not in a pop up box?

  • E = exponential constant right?

  • Euler is pronounced "Oiler"

  • Finally no more Arrays!

  • On a side note, Pi's millionth digit is 1 :)

  • Does anyone know how you put code in the YouTube comments? It gives me an error every time I try to put my code in.

  • @michaeldcurry1 Duh....! Same things happens to me also! :(

  • 1:02 I only know that pi = 3,1415!

  • I found this to be useful:

    var n = Math.random

    if(n>=.5){

    document.write(n + " - True");

    }

    else{

    document.write(n + " - False");

    }

  • fantastico...fogtalk99%

  • awesome stuff fogtalk96%

  • u should put it in do while !(n*=1) in case they doesn't enter a number

  • Bucky i have watched your HTML/CSS tutorials and almost done watching ( and of course understanding ) the javascript tutorials. The reason why i am watching it is because i want to make nice websites with flashing mouse-over and stuff. But you dont seem to take care of that stuff. Could you make a tutorial how to make a nice webpage and then just give the steps 1 by 1?

    Thanks

  • Man. This is the first time I've run a JavaScript with no typos on the first try. What is wrong with me.

    You Rock Bucky!

  • :3

  • You don't have to make separate variables:

    var n = promt("Enter a number");

    n = Math.sqrt(n);

    will do the same for you as making a new variable answer.

    It doesn't matter much at this point, but later on you might want to conserve your variables.

  • @Olafuuur Then you won't be able to use original n in alert function. In this example.

  • @Olafuuur but then the "alert("the sqrt of " + n + " is " + answer);" wont work as n is the answer.

  • Awesome

    !

    

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more