Javascript snippets

For break Classical for loop.. nothing to talk about it. Some loop The some() method tests whether at least one element in the array passes the test implemented by the provided function. It returns true if, in the array, it finds an element for which the provided function returns true; Read more…

Splice

The splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place. More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice