title: Getting An Array of Items within the last 24 hours from a given data using JavaScript
body: <p>I have some given data where I'm to return some set of arrays with just 24 hours using the time stamp in the given array. I tried the code below but it was returning the same data to me again. I hope I'm not doing</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const Array_1 = [
    { class_1: 4, HeadTeacher: "Mrs Joe", time_stamp: "2021-09-23 11:31:41" },
  ];
  const Array_2 = [
    { class_1: 10, HeadTeacher: "Loveth", time_stamp: "2021-09-16 15:16:40" },
  ];
  const Array_3 = [
    { class_1: 1, HeadTeacher: "Itunu", time_stamp: "2021-09-22 14:52:32" },
  ];
  const Array_4 = [
    { class_1: 1, HeadTeacher: "John", time_stamp: "2021-09-21 07:07:30" },
  ];
  
  const result = [...Array_1, ...Array_2, ...Array_3, ...Array_4];
  
  const Final = result.filter((item, index) =&gt; {
    return new Date(item.time_stamp - 86400 * 1000);
  });
  
  console.log(Final);</code></pre>
  </div>
  </div>
  </p>
  <p>it right.</p>