I have an array like [1,2,3,4,5,6,7] how can I search for an element without using any loops and built-in methods in javascript
?
Thanks in advance
It is possible, but you must have an JavaScript Object like this:
var Obj = {
'a':1,
'b':2,
'c':3,
'd':4,
'e':5
};
Without search you can access to your element like this:
console.log(Obj['a']);