is value in list javascript

Solutions on MaxInterview for is value in list javascript by the best coders in the world

showing results for - "is value in list javascript"
Sasha
10 May 2018
1function inListBoolean(list, item){
2    var boolean = false
3    list.forEach(value => {
4        if(value == item){
5            boolean = true
6        }
7    })
8    return boolean;
9}