bebo231312312321

Untitled

Mar 27th, 2023
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function phoneBook(input) {
  2.    let  obj = input.reduce((acu, count) => {[user, phone] = count.split(" ")
  3.      acu[user]=(phone); return acu },{})
  4.     Object.entries(obj).map(x=>console.log(`${x[0]} -> ${x[1]}`))
  5. }
Add Comment
Please, Sign In to add comment