Split array into two arrays

前端 未结 9 930
甜味超标
甜味超标 2020-12-24 10:24
var arr = [\'a\', \'b\', \'c\', \'d\', \'e\', \'f\'];
var point = \'c\';

How can I split the \"arr\" into two arrays based on the \"point\" variabl

9条回答
  •  粉色の甜心
    2020-12-24 11:15

    var arr = ['a', 'b', 'c', 'd', 'e', 'f'];
    var point = 'c';
    Array.prototype.exists = function(search){
        for (var i=0; i

    Here is an example.

提交回复
热议问题