Help with JavaScript/HTML calculation |
Help with JavaScript/HTML calculation |
TomHT |
Dec 18 2016, 11:29 PM
Post
#1
|
Group: Members Posts: 1 Joined: 18-December 16 Member No.: 24,974 |
I've been working on a little website for practice. I'm trying to make it so a user puts in a number (as their 100m sprint time) and then the website calculates what pace in FIFA they would be.
The formula to work this out is: Subtract 11 from your 100m sprint time to get a figure lets call X. Then divide X by 0.2 to get another figure lets call Y. Then subtract Y from 93 and you will get your pace stat. I've been watching videos and stuff to try and work out how to do it but I'm struggling. The image attached shows the code I've tried so far. Any help on how to do this would be much appreciated! Attached thumbnail(s) |
Christian J |
Dec 21 2016, 08:21 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
That's what I meant, those elements are not needed anyway. The calc variables are just used to store the calculations done on the num variable.
|
Lo-Fi Version | Time is now: 19th April 2024 - 08:11 PM |