Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function oddCouple (arr) {
- let newArr = [];
- for (const value of arr) {
- if (value % 2 === 1 && newArr.length < 2) newArr.push(value);
- }
- return newArr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement