How to use 'remove string from array' in JavaScript

Every line of 'remove string from array' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
341static removeValue(array, value) {
342 for (var tI = array.length - 1; tI >= 0; tI--) {
343 if (array[tI] === value) {
344 array.splice(tI, 1);
345 }
346 }
347}

Related snippets