Saturday, June 1, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  12] [ 4]  / answers: 1 / hits: 47028  / 10 Years ago, mon, november 17, 2014, 12:00:00

How do you prank a coworker or friend in a way that's hard to notice and fix? Preferably in JavaScript, and without having install any programs.


More From » javascript

 Answers
2

Greek Question Mark - Semicolon Prank


(Tested in JavaScript)


Replace one or several semicolons in a coworker or friend's code with the Greek question mark:


;


(source: http://en.wikipedia.org/wiki/Question_mark#Greek_question_mark)


If you compare the two, they look exactly the same: ;;



The first ; is a greek question mark, and the second ; is a normal semicolon.



The Greek question mark throws a SyntaxError: Unexpected token ILLEGAL in JavaScript, and probably throws errors in other languages as well. Make sure you're saving the code file in Unicode/UTF-8.


[#68787] Thursday, November 13, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
analiseb

Total Points: 252
Total Questions: 96
Total Answers: 106

Location: Singapore
Member since Sat, Jul 25, 2020
4 Years ago
analiseb questions
;