Advertisement
bebo231312312321

Untitled

Mar 7th, 2023
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function piccolo(input) {
  2.     let parkingLIst = {}
  3.     input.map(el => el.split(', '))
  4.         .map(el => {if (el[0] === "IN")  parkingLIst[el[1]] = el[1];
  5.             else if (el[0] === 'OUT')delete parkingLIst[el[1]];
  6.         });
  7.         Object.entries(parkingLIst).sort().forEach(x => console.log(x[0]))
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement