I know OP had questionable motives, but I solved these questions. If anyone is interested in the answer,

function max(x,y){
if(x > y){
return x;
}
else{
return y;
}
}