This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const equations = [ | |
"7 + x = 20", // x = 13 | |
"x + 15 = 40", // x = 25 | |
"12 - x = 5", // x = 7 | |
"x - 8 = 10", // x = 18 | |
"-5 + x = 12", // x = 17 | |
"x + 30 = -10", // x = -40 | |
"25 - x = -5", // x = 30 | |
"x - 50 = -100", // x = -50 | |
"-40 - x = -100", // x = 60 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sameTest(number) { | |
number = number.toString(); | |
let upSideDown = ""; | |
let flipText = ""; | |
for (let i = 0; i < number.length; i++) { | |
if (number[i] == "6") { | |
upSideDown += "9"; | |
} else if (number[i] == "9") { | |
upSideDown += "6"; |