Ad
Code
Diff
  • function kumite(arr) {
      return arr.filter((x, i, arr) => arr[i - 1] !== x && arr[i + 1] !== x);
    }
    • function kumite(arr) {
    • return [];
    • return arr.filter((x, i, arr) => arr[i - 1] !== x && arr[i + 1] !== x);
    • }
Code
Diff
  • print('hello world')
    • print ('hello world)
    • print('hello world')
Code
Diff
  • const AbbreviateTwoWords = s => {
      const [a, b, ...c] = s.split(' ');
      return `${a[0]}.${b[0]}. ${c}`
    }
    • const AbbreviateTwoWords = s => {
    • const [first, middle, ...rest] = s.split(' ')
    • return `${first.slice(0,1)}.${middle.slice(0,1)}. ${rest}`
    • const [a, b, ...c] = s.split(' ');
    • return `${a[0]}.${b[0]}. ${c}`
    • }