Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const person = {};
- args.forEach((element) => {
- const [name, phone] = element.split(' ');
- person[name] = phone;
- });
- Object.entries(person).map((element) => {
- const [name, phone] = element;
- return console.log(`${name} -> ${phone}`);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement