Advertisement
bebo231312312321

Untitled

Mar 19th, 2023
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function rageQuit(input = []) {
  2.     input = input.shift().match(/[\D]+([\d]+)/g).reduce((s, x) => {
  3.      x= x.match(/([\D]+)([0-9]+)/)
  4.             return s += (x[1].toUpperCase()).repeat(Number(x[2]))
  5.     }, "")
  6.     let reduced = (new Set(input).size);
  7.     console.log(`Unique symbols used: ${reduced} \n ${input}`);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement