I have a array in javascript
var arr = ["12","22","33","42"];
- If I search for 1 it should not match because it is not a complete array element.
- If I search for 12 it should match because it is a complete array element.
I have searched web for this but found
var match = arr.indexOf('1');
But this does not solve my problem
Anybody can help?