Time for a math test. This time faith is aiming to test our math skills. Lets see, what she has got for us.
var foo = 5 + 6 * 7 var bar = foo % 8 var moo = bar * 2 var rar = moo / 3 function check(x) { if (x.length == moo) { alert("win!"); window.location += "?lvl_password="+x; } else { alert("fail D:"); } }
After checking out the source code, you can see that the length of the word you will enter is passed to function check which is then compared to moo. So, lets just find out moo.
After calculations you will find that, variable foo has the value 47 and variable bar has value of 7. How? ‘%'(percentage sign) in almost all programming languages is used as modulus, which is used to find the remainder, here 47 divided by 8 gives remainder 7. And therefore moo has the value of 14. Any string with the length of 14 will do.
Good luck!!!
Latest posts by Abhishek Gupta (see all)
- Laravel Custom Exception Handlers - March 28, 2019
- Customizing Laravel validation JSON message format - March 20, 2019
- Time killer and addictive Google Games - March 19, 2019
bro but then what is the use of rar= moo/3
No use. Sometimes things exist for the sole purpose of creating confusion.