<div>0</div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
function take (item, array, context) {
return array[(context || array).indexOf(item)];
}
var nodes = document.getElementsByTagName('div');
var array = [].slice.call(nodes);
var item = array[2];
var tooked = take(item, array); // => <div>2</div>