This commit is contained in:
itsvinayak
2020-05-05 17:41:32 +05:30
parent 9d4349cf26
commit 6507cbf7d4
3 changed files with 14 additions and 11 deletions

View File

@ -4,6 +4,7 @@
*
*/
/* eslint no-extend-native: ["off", { "exceptions": ["Object"] }] */
Array.prototype.wiggleSort = function () {
for (let i = 0; i < this.length; ++i) {
const shouldNotBeLessThan = i % 2