Non-standard Array/String generics will be removed

Published: | Categories: JavaScript

Description

The non-standard Array generic methods and String generic methods, introduced with JavaScript 1.6 and deprecated since Firefox 53, will be removed in the future.

The spread syntax can be used as a simple alternative to the Array generics. For example, Array.every(str, callback) can be replaced with [...str].every(callback).

The String global object can be used as a simple alternative to the String generics. For example, String.replace(num, search, replace) can be replaced with String(num).replace(search, replace).

References