Javascript simple taks : So, my task is to sort an array in Javascript by one parameter - value. It is calculated via .map method which applies a formula to some object parameters, calculating them. .map is supposed to return an array so that I could use is for sorting, but somehow I get undefined. 
This Javascript task should be simple, yet I don’t get it!
Here is the code 

    function comparisonGame () {
    	var peopleArr = [
    		person_1 = {
    			name: 'Nikita',
    			age: 26,
    			height: 182,
    			value: 0
    			},
    		person_2 = { 
    			name: 'Pasha',
    			age: 28,
    			height: 193,
    			value: 0
    			},
    		person_3 = { 
    			name: 'Olexey',
    			age: 31,
    			height: 168,
    			value: 0
    		}
    		];
    	var transformendArr = [];
    	function compare (value_1, value_2) 
    	{
    		if(value_1<value_2)
    		{
    			return 1;
    		} else if (value_1=value_2) 
    				{
    					return -1;
    				} 
    			else {
    				return 0;
    			}
    	}
    
    	transformendArr = peopleArr.map(function (age, height)
    											{ 
    												return this.value = this.age * 5 + this.height;
    											});
    	var sortedArr = transformendArr.value.sort(compare);
    	return this.sortedArr[0].name;
    }
    alert(comparisonGame() + ' is a winner!')