Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created November 19, 2014 18:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/b0a154f58959f3c4d188 to your computer and use it in GitHub Desktop.
Save miguelmota/b0a154f58959f3c4d188 to your computer and use it in GitHub Desktop.
Minus percent function in JavaScript
function minusPercent(n,p) {
return n - (n * (p/100));
}
console.log(minusPercent(100,30)); // 70
@kamal-hossain
Copy link

thanks for this!

@pratikvala
Copy link

thanks bro

@SlyDeath
Copy link

awesome

@vitaliynakonechnyy7
Copy link

Super. Thks !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment