How to remove element from array in forEach loop?

前端 未结 7 521
耶瑟儿~
耶瑟儿~ 2020-11-28 03:37

I am trying to remove an element in an array in a forEach loop, but am having trouble with the standard solutions I\'ve seen.

This is what I\'m current

7条回答
  •  时光取名叫无心
    2020-11-28 03:48

    The following will give you all the elements which is not equal to your special characters!

    review = jQuery.grep( review, function ( value ) {
        return ( value !== '\u2022 \u2022 \u2022' );
    } );
    

提交回复
热议问题