1.
GetTopRankCode(rankQID)
ShowAlert("당신이 가장 좋아하는 과일은 "+q[GetTopRankCode('q272')].label()+"입니다.")
function PickLowestFromArray(priorityArr, checkArr)
{
checkArr.sort();
// DEBUG("checkArr = " + checkArr);
var returnElement = null;
var isMatched = false;
for (var j=0; j < priorityArr.length && !isMatched; j++)
{
DEBUG("priorityArr.length : "+priorityArr.length);
DEBUG("J : "+j);
var currentPriority = priorityArr[j];
currentPriority = parseInt(currentPriority, 10);
// DEBUG("currentPriority = " + currentPriority);
for (var i=0; i < checkArr.length && !isMatched; i++)
{
var currentCheck = checkArr[i];
currentCheck = parseInt(currentCheck, 10);
// DEBUG("currentCheck = " + currentCheck );
if (currentPriority == currentCheck)
{
returnElement = currentPriority;
// DEBUG("***MATCHED! ***");
isMatched = true;
break;
} // end if
} // end i loop
} // end j loop
// DEBUG("returnElement = " + returnElement);
return returnElement;
} // end function
currentPriority = parseInt(currentPriority, 10);이 부분이 오류를 내고 있었다.
currentCheck = parseInt(currentCheck, 10);
var priorityArray = f("brands").categoryLabels();이렇게 문항의 categoryLabels() 즉, 한글이나 영어를 받아오는데,var CheckArr = f("brands2").categoryLabels();
var NewArr = PickLowestFromArray(priorityArray, CheckArr);
currentPriority = NaN이렇게 나올 수 밖에...-_-;
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentPriority = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentPriority = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentPriority = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentPriority = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentPriority = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentPriority = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
currentCheck = NaN
100129 TNS Korea Internship (34/53) (0) | 2010.01.29 |
---|---|
100128 TNS Korea Internship (33/53) (0) | 2010.01.28 |
100126 TNS Korea Internship (31/53) (0) | 2010.01.26 |
100125 TNS Korea Internship (30/53) (0) | 2010.01.25 |
100122 TNS Korea Internship (29/53) (0) | 2010.01.22 |