comparing two javascript arrays?

前端 未结 3 1071
情歌与酒
情歌与酒 2021-01-29 10:47

I want to compare two arrays with each other and see if there is a match, and if there is do something.

var answers = new Array(\"a\",\"b\",\"c\",\"d\", \"e\");
         


        
3条回答
  •  借酒劲吻你
    2021-01-29 11:34

    Look this post, there is a code to compare disorder arrays: http://blog.maxcnunes.net/2012/08/10/comparacao-de-arrays-desordenados-javascript/

    ps: the post is in portuguese, but you can use any translater to understand

提交回复
热议问题