5 Replies Latest reply on Feb 5, 2018 10:30 AM by acafilipovic

    Two arrays, values less than 20 from one array delete the same index numbers from second array

    acafilipovic

      Hi guys,

      I have two arrays:

      var keyTimes = new Array(1,2,3,4,5);
      var keyValues = new Array (30,10,5,25,15);

      I want to find numbers less then 20 in keyValues and delete the same index numbers from keyTimes array.

      So, the keyTimes array should look like this:

      keyTimes = (1,4);

      Thanks