js trivia challenge!
you can write anything on line one, how are you getting the flag?
i originally wanted to make this into a ctf chall, but it's a bit too "win by knowing 1 obscure trick" to be good
js trivia challenge!
you can write anything on line one, how are you getting the flag?
i originally wanted to make this into a ctf chall, but it's a bit too "win by knowing 1 obscure trick" to be good
@rebane2001 oh wow, that was harder than I thought.
Final answer: const x = (BigInt.prototype.length = 1, 0n)
What I tried:
[Symbol.toPrimitive] custom implementation. Failed because objects are directly truthy and not converted to bool.String.prototype.length and use an empty string. Failed because init x as an empty string seems to set the length again.Phew, it was a lot harder than I thought at first. But then, if you know the solution it's not that hard to understand.