Variable cannot be resolved in an If-Statement
问题 I'm trying to do the below tutorial question. // Create a method called greatestCommonFactor // It should return the greatest common factor // between two numbers. // // Examples of greatestCommonFactor: // greatestCommonFactor(6, 4) // returns 2 // greatestCommonFactor(7, 9) // returns 1 // greatestCommonFactor(20, 30) // returns 10 // // Hint: start a counter from 1 and try to divide both // numbers by the counter. If the remainder of both divisions // is 0, then the counter is a common