Created
October 13, 2015 05:41
-
-
Save crongro/6c0f5dd1d0e38f55f301 to your computer and use it in GitHub Desktop.
debugError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function execCalc(aData) { | |
var nMin = Number.MAX_VALUE; | |
var nMax = Number.MIN_VALUE; | |
for(var i = 0 ; i < aData.length; i++) { | |
if(aData[i] < nMin) { | |
nMin = aData[i]; | |
}else if(aData[i] > nMax) { | |
nMax = aData[i]; | |
}else{} | |
} | |
console.log('최소값 : ' + nMin + ', 최대값 : ' + nMax); | |
} | |
execCalc([300,3,3,-4.3,5,3.3,2,0]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment