Hi I'm new here and new to javascripting too. I have picked up other languages quite quickly, but javascript is proving more difficulf for me.

I need javascript to return max number of three numbers using if else statements with multiple conditions.

So far what i have is not working and I'm stuck. My appologies for the clumsy coding. Any help would be greatly appreciated.

<body>

<p>Define a function maxOfThree() that takes three numbers as arguments and returns the largest of them.<br/>

If 2 values are the highest it should say which 2. If all values are the same it should let the user know</p>

<dl>

<dt>84, 35, 45</dt>

<script type="text/javascript" language="javascript">

var a = 84;

var b = 35;

var c = 45;

var d = maxOfThree();

function(maxOfThree)

{if (a == b)&&(a == c){

return "all values are equal";

{else if(a == b)&&(a > c){

return "Values 1 & 2 are greater";

}else if(a == b)&&(a < c){

return c;

}else if(a == c)&&(a > b){

return "values 1 & 3 are greater";

}else if(a == c)&&(a < b){

return b;

}else if(b == c)&&(b > a){

return "values 2 & 3 are greater";

}else if(b == c)&&(b < a){

return a;

}

</script>

<dd class="result">!!!Answer!!!</dd>

!!!Answer!!! is where i need the result to return to but I think my fuction is flawed, my logic behind it may also be flawed and I haven't yet contemplated how or where to get the answer to return where I need it to.