dima***,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Документ без названия</title>
</head>
<body>
<script>
function sum(i){
var a=arr[i][1]+arr[i][2];
return a;
}
function pro(i){
var a=arr[i][1]*arr[i][2];
return a;
}
function raz(i){
var a=arr[i][1]-arr[i][2];
return a;
}
var arr=[
["Петя",9,3],
["Маша",8,5],
["Коля",7,3],
["Вася",6,1]
];
var arr_new = []
for(i=0;i<arr.length;i++){
arr_new[i] = [arr[i][0],sum(i),pro(i),raz(i)]
}
arr_new.sort(function (a, b)
{
return b[1] - a[1]
})
document.write(arr_new.join('<br />'))
</script>
</body>
</html>