I am wondering how in javascript if i was given a number (say 10000) and then was given a percentage (say 35.8%)
how would I work out how much that is (eg 3580)
See Question&Answers more detail:osI am wondering how in javascript if i was given a number (say 10000) and then was given a percentage (say 35.8%)
how would I work out how much that is (eg 3580)
See Question&Answers more detail:osvar result = (35.8 / 100) * 10000;
(Thank you jball for this change of order of operations. I didn't consider it).