JavaScript Prank / Joke

Javascript

Javascript Problem Overview


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.

Javascript Solutions


Solution 1 - Javascript

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLucView Question on Stackoverflow
Solution 1 - JavascriptLucView Answer on Stackoverflow