これは私のコードです。毎回 alert() の NaN です。
function updateScore(action){
var cookieArray = document.cookie.split(";");
var encodedURL = cookieArray[2];
var decodedURL = decodeURIComponent(encodedURL);
//check if cookie exists
if (decodedURL == "undefined"){
setCookie("rrcookie_score","0",1)
}
var oldScore = decodedURL.split('=');
//alert(oldScore[1]);
var oldScoreInt = parseInt(oldScore);
var newScore = oldScoreInt + 1;
alert(newScore);
}