Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const products = {};
- args.forEach((el, index) => {
- if (index % 2 === 0) {
- products[el] = Number(args[index + 1]);
- }
- });
- console.log(products);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement