Ad

Given an array with integers, remove numbers which are duplicated with previous or next sibling.

For example, with array [1, 3, 2, 2, 2, 4, 7, 7, 9, 5, 3], the result should be [1, 3, 4, 9, 5, 3].

function kumite(arr) {
  return [];
}
Code
Diff
  • function isEven(input) {
      return input%2===0;
    }
    • function isEven(input) {
    • return true;
    • return input%2===0;
    • }

Check given number, return true if it is an even number, otherwise return false.

For example isEven(3) will return false, isEven(4) will turn true.

function isEven(input) {
  return true;
}