Topic: who is good with javascript?
I need help with variables and the equations each uses
1431 ftw
Login is disabled. This forum is read-only.
Imperial Forum → General → who is good with javascript?
I need help with variables and the equations each uses
post and maybe I can help ![]()
x = 5;
well, I was working with the first part and got that down, then as I was working with the variables I got stuck, as I got all the elses and if in, but I feel like I'm missing something.
I'm supposed to input 1 number and yes or no. And then it says such and such.
I don't have it on me but i can get it tomorrow
Sounds like easy shit!
Post up bro!
#1> Can you help me with my code
#2> Maybe, tell me more
#1> I don't have it with me maybe tomorrow
Wonders how #1 ever has trouble getting help
well, i managed to get one to work, one of the things is that they want us to have 3 input variables and set it up so that when you input a number, it calculates the other two numbers.
the variables are supposed to be mph, kph and feet/second
you input mph and then javascript calculates out kph and ft/s and ends up as such : 30 miles per hour = 44 kilometers per hour = 76 feet per second or some such (that was an example)
now I've got the variables down, that's it. pretty much the variables and parseFloat, after that, I'm stumped
<html>
<script>
<!-- code you want starting here (this is a comment)
var mph = 30;
var kmph = 30 * 1.6;
var ftps = (kmph * 3.28083) / 3.6;
document.write( mph + " miles per hour = " + kmph + " kilometers per hour = "+ ftps +" feet per second" );
// or this...
alert( mph + " miles per hour = " + kmph + " kilometers per hour = "+ ftps +" feet per second" );
code you want endinghere (this is a comment) -->
</script>
</html>
like this?
something like that, yeah, I'm still not sure what to do at certain points though but thank you Elro!
/me huggles Elro!
which parts? ![]()
Imperial Forum → General → who is good with javascript?
Powered by PunBB, supported by Informer Technologies, Inc.