Цhat is the most effective way to find an element position within an array, if we got access to the element itself?
var arr = [];
for (var i = 0; i < 10; i++) {
arr[i] = {test: Math.floor(Math.random() * 101)}
}
var test = arr[Math.floor(Math.random() * 11)];
Now how can I get the position of the element that test refer to?