Basandome en lo que has dicho e arreglado el codigo de la siguiente manera:
Código:
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title></title>
<script>
function movimientoAlfil(f1, f2, c1, c2)
{
return (Math.abs(f2-f1)==Math.abs(c2-c1));
}
</script>
</head>
<body>
<script>
alert(movimientoAlfil(2,2,4,3));
</script>
</body>
</html>
Ahora si que muestra resultado. Pero no se como hacer para que funcione en todos los casos