eniallator

Answer to: CodeGolf: Converting a number to British currency

Jul 26th, 2018
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. f=(n,i=0)=>n<0.01?'':(e=n-'521'[i%3]*10**(1-~~(i/3)))>=0?i+','+f(e.toFixed(2),i):f(n,i+1)
Advertisement
Add Comment
Please, Sign In to add comment