SHARE
TWEET

Untitled

a guest Jun 19th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var a=document.getElementsByClassName("toggle-row");
  2. var total=0.0;
  3. for(var i=0;i<a.length;i++){
  4. if(a[i].childNodes[7].innerText=="Withdrawal"){total=total+parseFloat(a[i].childNodes[11].innerText)}
  5. else{total=total-parseFloat(a[i].childNodes[11].innerText)}}
  6. if(total > 0){console.log("%cPROFIT: "+Math.round(total*100)/100+"$","color:green;font-size:x-large")}
  7. else{console.log("%cLOSS: "+Math.round(total*100)/100+"$","color:red;font-size:x-large")}
RAW Paste Data
Want to get better at JavaScript?
Learn to code JavaScript in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top