Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let firstList = gets().replace(',', '').split('').map(Number);
- let secondList = gets().replace(',', '').split('').map(Number);
- let combinedLists = [];
- for (let i = 0; i < firstList.length; i++) {
- combinedLists.push(firstList[i], secondList[i]);
- }
- print(combinedLists.filter(function(element){
- return !Number.isNaN(element);
- }).join(','))
- // Код 2 започва от тук надолу
- let firstList = gets();
- let secondList = gets();
- let combinedLists = [];
- for (let i = 0; i < firstList.length; i++) {
- combinedLists.push(firstList[i], secondList[i]);
- }
- combinedLists = combinedLists.toString().replace(/,/g, '');
- print(combinedLists.toString().split('').join(','));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement