GGaramYooningaramyoon.hashnode.dev·Nov 3, 2024 · 2 min readFlag, Is It Always Efficient?//variables int value; int numOfValue = 0; int sum = 0; int stop = 100; int flag = 1; //first code with flag do { if (sum <= 100 && flag == 1 ) { Console.Write("Enter the value: "); value = Convert.ToInt32(Console....00
GGaramYooningaramyoon.hashnode.dev·Jul 15, 2024 · 1 min readDetermining Return Values (Using the Console)const number = Number(prompt('How many people?')); if(number){ } When the user clicks "Cancel" in prompt(), it returns null. Since Number(null) results in 0, number is set to 0. This behaviour can be observed directly in the console. Before understa...00
GGaramYooningaramyoon.hashnode.dev·Jul 15, 2024 · 1 min read"Error & Solution _ if(Ternary Operator), Evaluating true and false"<Error code> const onClickButton = () => { if(!word || (newWord.length === 3 || word[word.length - 1] === newWord[0])){ // ...code } }; In this function, the first condition checks for newWord.length === 3. However, even if newWo...00
GGaramYooningaramyoon.hashnode.dev·Jul 15, 2024 · 3 min readError & Solution _ else문도 신경 쓰기 _ (07152024-1)<작성 코드> <html lang="ko"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>쿵쿵따 게임</title> </head> <body> <div>쿵쿵따 게임</div> <div><span id="order">1</span>번째 참가자</div> <d...00