JavaScript - Help With Var Multiplier
Here is what i'm trying to do.
Var x=0; var y=0; function go(){ // these two var are inputs. var run=get_form_value("run_fast"); var breath=get_form_value("take_a_breath"); x++; y++; run action; function (){ if (x<run) {go()} if(y==breath || (y==breath^2 || (y==breath^3))){drink();} }; This doesn't work but maybe you get the idea behind it. by the way when i run this version it will run all 20 times and it will take a breath at 5 but then for the remander of runs it takes a breath after every run after. assume that a person can only run 5 before taking a breath. inputs are (run_fast = 20) and (take_a_breath=5) The idea here is to run 20 times but take a drink after each set of 5 runs. the reason i have to do y= breath times 2 is because everyone is differant some can run 6 before a breath some only 4. can someone please help with this. i've worked on it all day and my head hurts from trying. Similar TutorialsHello everyone, I need help i need to create a very simple multiplier in javascript to multiply two values like it should ask me first value then second and then show its result Thanks in advance Reply With Quote 01-13-2015, 02:33 PM #2 Dormilich View Profile View Forum Posts Senior Coder Join Date Jan 2010 Location Behind the Wall Posts 3,532 Thanks 13 Thanked 372 Times in 368 Posts what have you tried? |