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