function ExtractIncreasingSubsequence(arr) {

  let biggestNum = -999999;
  for (let i = 0; i < arr.length; i++) {
    let currentNum = arr[i];

    if (currentNum >= biggestNum) {
      biggestNum = currentNum;
    } else {
      arr.splice(i, 1);
      i--;
    }

  }

  for (let i = 0; i < arr.length; i++) {
    console.log(arr[i]);
  }

}

//ExtractIncreasingSubsequence([1, 3, 8, 4, 10, 12, 3, 2, 24]);
{'avg_line_length': 18.59090909090909, 'max_line_length': 63, 'alphanum_fraction': 0.5501222493887531, 'licenses': ['MIT'], 'repository_name': 'Knightwalker/KB', 'path': '03_Programming_Advanced/01_JS_Core/01_JavaScript_Fundamentals/06_Arrays_and_Matrices_Exercise/05_ExtractIncreasingSubsequence.js', 'size': 409, 'lang': 'JavaScript'}