From 202faf2220a19b6182b32c6f8f67c8fc3e3d2b8a Mon Sep 17 00:00:00 2001 From: Theodore Nguyen <109197491+theodoretnguyen@users.noreply.github.com> Date: Tue, 28 Feb 2023 17:47:40 -0800 Subject: [PATCH] Add dollar signs to revenue --- app.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index d946b6a..8a8a7a9 100644 --- a/app.js +++ b/app.js @@ -19,13 +19,15 @@ document.getElementById('button_io').addEventListener('click', ); // show revenues button +let rev_bg6 = 0; +let rev_io = 0; document.getElementById('button_rev').addEventListener('click', function() { - let rev_bg6 = tix_bg6 * 3 * red_token_price + tix_bg6 * 2 * blue_token_price; - document.getElementById('rev_bg6').innerHTML = `${rev_bg6}`; + rev_bg6 = tix_bg6 * 3 * red_token_price + tix_bg6 * 2 * blue_token_price; + document.getElementById('rev_bg6').innerHTML = `$${rev_bg6}`; - let rev_io = tix_io * 2 * red_token_price + tix_io * 3 * blue_token_price; - document.getElementById('rev_io').innerHTML = `${rev_io}`; + rev_io = tix_io * 2 * red_token_price + tix_io * 3 * blue_token_price; + document.getElementById('rev_io').innerHTML = `$${rev_io}`; } );