DEV Community

Discussion on: Untitled Developer Game

Collapse
 
mstrodl profile image
Mary

This replaces every l (L) in every "word" with a 1 (one). So: let appleVariable = "goose!"; becomes let app1eVariab1e = "goose!";

Thread Thread
 
dmfay profile image
Dian Fay • Edited

Importantly it doesn't replace the lowercase L if it's the first letter of the word, since many languages won't allow names to start with a number. So the code is much more likely to compile/run than with a simple global replacement, and the victim will find hunting the problems down that little bit harder.

Thread Thread
 
philnash profile image
Phil Nash

That I couldn't see the difference between the l (L) and the 1 (1) in the code example makes this pretty evil! 😈