asd

function lostSheep(friday,saturday,total) {
  console.log( total - friday.concat(saturday).reduce((a,b) => a + b, 0) );

  //console.log(total)
}

lostSheep([3, 1, 2], [4, 5], 21)
lostSheep([], [], 21)

//Example 2: Input: {3, 1, 2}, {4, 5}, 21 --> Output: 6

results matching ""

    No results matching ""