Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let nums = [
- [1,2,3],
- [4,5,6]
- ]
- let sum = 0;
- for(let i = 0; i<nums.length; i++){
- for(let j=0; j<nums[i].length; j++){
- if(nums[i][j]%2===0){
- sum += nums[i][j];
- }
- }
- }
- console.log(`sum= ${sum}`);
Advertisement
Add Comment
Please, Sign In to add comment