Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const dictionary = {};
- args.forEach((element) => {
- const parseData = JSON.parse(element);
- Object.assign(dictionary, parseData);
- });
- const sortDictionary = Object.keys(dictionary).sort((a, b) => a.localeCompare(b));
- sortDictionary.forEach((element) => {
- console.log(`Term: ${element} => Definition: ${dictionary[element]}`);
- });
- }
Add Comment
Please, Sign In to add comment