Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(args) {
- const arrStr = args.split(' ');
- const strMap = new Map();
- arrStr.forEach((el, index) => {
- strMap.set(index, el);
- });
- const mapIter = strMap.values();
- let result = mapIter.next();
- while (!result.done) {
- console.log(result.value);
- result = mapIter.next();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement