'use strict';
var info = [['Brent',0,2,3],['Yaphi',1,3,1],['Bruce',1,4,3],['Luke',1,2,1]];
function smartAssign(info){
return info.reduce((a,v)=>{return v[1]&&( v[3]<a[3] || (v[3]==a[3] && v[2]<a[2]) ) ? v : a}, [null,1,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY])[0];
}