JavaScript

Scoping

function hypotenuse(a,b){
        function squarea() {
                return a*a;
        }
        function squareb() {
                return b*b;
        }
        return Math.sqrt(squarea() + squareb());
}
hypotenuse(2,2);

José M. Vidal .

47 of 65