In my code, " btn.addEventListener('mouseout', event => {

 if (hasBeenClicked === false){
 if (currentRating !== "0" && currentRating !== btn.title) {
 // if (rating !== "0") {

 console.log("mouseout: hasBeenClicked: " + hasBeenClicked)

 updateTitles(currentRating);
 updateClasses(currentRating);
 }
 }
 // }
 });

 if (rating\_star\_mode === 'full'){
 btn.addEventListener('click', event => {
 if (btn.title !== "Unset") {
 console.log('click: (btn.title !== "Unset"): btn.title : ' + btn.title);
 updateSceneRating(sceneId, Number(btn.title));
 } else {
 console.log('click btn: (btn.title !== "Unset") else : btn.title : ' + btn.title);
 updateTitles("0");
 updateClasses(0);
 updateSceneRating(sceneId, null);
 }
 });
 }

 if (rating\_star\_mode === 'half'){
 }
 if (rating\_star\_mode === 'quarter'){
 let currentValue = Number(btn.title);
 let originalValue = currentValue;

 btn.addEventListener('click', event => {
 if (hasBeenClicked) {
 clearTimeout(timeoutId);
 hasBeenClicked = false;
 console.log("")
 } else {
 hasBeenClicked = true;
 }
 console.log("hasBeenClicked: " + hasBeenClicked)
 if (btn.title !== "Unset") {
 console.log('Click: ' + btn.title + ': btn.title !== "Unset"');
 clearTimeout(timeoutId);
 console.log(originalValue + ": originalValue: ")

 currentValue -= 0.25;
 if (currentValue < 1) {
 currentValue = 1;
 }

 console.log("Click: " + currentValue + ": currentValue: ")
 console.log(Number(btn.title) + ": Number(btn.title)")

 if (Number(btn.title) < Math.floor(originalValue)){
 console.log('Click: ' + Number(btn.title) + ': Number(btn.title) < ' + Math.floor(originalValue) + ': Math.floor(originalValue)');

 updateTitles(Number(btn.title));
 updateClasses(Number(btn.title));

 } else if (currentValue < originalValue){
 console.log('Click: ' + currentValue + ': currentValue < ' + originalValue + ': originalValue');
 updateTitles(currentValue);
 updateClasses(currentValue);

 } else if (Number(btn.title) > originalValue){

 console.log("Click: " + Number(btn.title) + ": Number(btn.title) > " + originalValue + ": originalValue");
 updateTitles(Number(btn.title));
 updateClasses(Number(btn.title));
 }
 if (Number(btn.title) === Math.ceil(currentValue)){
 console.log("Click: " + Number(btn.title) + ": Number(btn.title) === " + Math.ceil(currentValue) + ": Math.ceil(currentValue)");
 updateTitles(currentValue);
 updateClasses(currentValue);
 }
 if (Number(btn.title) < originalValue){
 console.log("Click: " + Number(btn.title) + ": Number(btn.title) < " + originalValue + ": originalValue");
 updateTitles(Number(btn.title));
 updateClasses(Number(btn.title));
 }
 timeoutId = setTimeout(() => {
 console.log("setTimeout: currentValue" + currentValue + " : originalValue: " + originalValue);
 if (currentValue > originalValue || currentValue < Math.floor(originalValue)) {

 originalValue = Number(btn.title)
 updateSceneRating(sceneId, Number(btn.title));
 console.log("Click > setTimeout : currentValue > originalValue || currentValue < Math.floor(originalValue)")
 console.log("Click > setTimeout > updateSceneRating: " + sceneId + ": sceneId " + currentValue + ": currentValue")
 }

 else {
 console.log("Click > setTimeout : Else")
 console.log("Click > setTimeout > updateSceneRating: " + sceneId + ": sceneId " + currentValue + ": currentValue")
 originalValue = currentValue
 updateSceneRating(sceneId, currentValue);
 }
 }, rating\_star\_delay);
 } else {
 console.log('Click: ' + btn.title + ': btn.title === "Unset"');
 updateTitles("0");
 updateClasses(0);
 updateSceneRating(sceneId, null);
 }
 });
 }

 });", how do I in the setTimeout, update originalValue, so that originalValue will reflect a new value if the button is clicked again?
내 코드," btn.addEventListener('mouseout', event => {{ if (hasBeenClicked === false){{ if (currentRating !== "0" && currentRating !== btn.title) { // if (rating !== "0") { console.log("마우스아웃: hasBeenClicked: " + hasBeenClicked) updateTitles(currentRating); updateClasses(currentRating); } } // } }); if (rating\_star\_mode === 'full'){ btn.addEventListener('click', event => { if (btn.title !== 'Unset') { console.log('click: (btn.title !== "Unset"): btn.title : ' + btn.title); updateSceneRating(sceneId, Number(btn.title)); } else { console.log('click btn: (btn.title !== "Unset") else : btn.title : ' + btn.title); updateTitles("0"); updateClasses(0); updateSceneRating(sceneId, null); } }); } if (rating\_star\_mode === 'half'){} } if (rating\_star\_mode === 'quarter'){ } let currentValue = Number(btn.title); let originalValue = currentValue; btn.addEventListener('click', event => { if (hasBeenClicked) { clearTimeout(timeoutId); hasBeenClicked = false; console.log("") } else { hasBeenClicked = true; } console.log("hasBeenClicked: " + hasBeenClicked) if (btn.title !== "Unset") { console.log('클릭: ' + btn.title + ': btn.title !== "Unset"'); clearTimeout(timeoutId); console.log(originalValue + ": originalValue: ") currentValue -= 0.25; if (currentValue < 1) { currentValue = 1; } console.log("클릭: " + 현재값 + ": 현재값: ") console.log(Number(btn.title) + ": Number(btn.title)") if (Number(btn.title) < Math.floor(originalValue)){{ console.log('Click: ' + Number(btn.title) + ': Number(btn.title) < ' + Math.floor(originalValue) + ': Math.floor(originalValue)'); updateTitles(Number(btn.title)); updateClasses(Number(btn.title)); } else if (currentValue < originalValue){{ console.log('Click: ' + currentValue + ': currentValue < ' + originalValue + ': originalValue'); updateTitles(currentValue); updateClasses(currentValue); } else if (Number(btn.title) > originalValue){{ console.log("Click: " + Number(btn.title) + ": Number(btn.title) > " + originalValue + ": originalValue"); updateTitles(Number(btn.title)); updateClasses(Number(btn.title)); } if (Number(btn.title) === Math.ceil(currentValue)){{ console.log("Click: " + Number(btn.title) + ": Number(btn.title) === " + Math.ceil(currentValue) + ": Math.ceil(currentValue)"); updateTitles(currentValue); updateClasses(currentValue); } if (Number(btn.title) < originalValue){{ console.log("Click: " + Number(btn.title) + ": Number(btn.title) < " + originalValue + ": originalValue"); updateTitles(Number(btn.title)); updateClasses(Number(btn.title)); } timeoutId = setTimeout(() => { console.log("setTimeout: 현재값" + 현재값 + " : 원래값: " + originalValue); if (currentValue > originalValue || currentValue < Math.floor(originalValue)) { originalValue = Number(btn.title) updateSceneRating(sceneId, Number(btn.title)); console.log("클릭 > 설정타임아웃 : 현재값 > 원래값 || 현재값 < Math.floor(원래값)") console.log("클릭 > 설정타임아웃 > 업데이트 씬레이팅: " + sceneId + ": sceneId " + currentValue + ": currentValue") } else { console.log("클릭 > 설정타임아웃 : 기타") console.log("클릭 > 설정타임아웃 > 업데이트 씬레이팅: " + sceneId + ": sceneId " + currentValue + ": currentValue") 원래 값 = 현재 값 updateSceneRating(sceneId, currentValue); } }, rating\_star\_delay); } else { console.log('클릭: ' + btn.title + ': btn.title === "Unset"'); updateTitles("0"); updateClasses(0); updateSceneRating(sceneId, null); } }); } }); });", 버튼을 다시 클릭하면 원래 값이 새 값을 반영하도록 setTimeout에서 원래 값을 업데이트하려면 어떻게 해야 하나요?