JavaScript

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
Whoops! Maybe you were looking for Java?

“JS, unlike Python, was a rushed little hack.”

~ Brendan Eich on Javascript

“Javascrip, the language of the lonely soul”

This is not Java script....

JavaScript is a type of ineffectual computer virus, first created in 1995 by the well known script kiddie Brendan Eich of the trolling organisation "Mozilla".

The early web was a surprisingly safe environment, one in which a parent could allow their child to roam as free as Adam. Acting in response to this, the Java computer virus was created to annoy and mentally disturb Internet viewers. Java, however, was limited in its ability to wreck havoc, being more or less restricted to slowing down the loading of a web page; not a particularly effective means of annoying people.

JavaScript, ( "Java" + "Script Kiddie" ), was an attempt to improve the virus's effectiveness. One of its early success stories was the ability to cause one image to be replaced by another when the user would roll over it. This confusion tactic was simple, but ultimately lead to better forms of Internet harassment. The height of its popularity within the hacker community came when the "Pop-up Technique" was created, a truly brilliant way to lock a user into view hundreds of porn sites with no way to exit their browser. Unlike most viruses, JavaScript uses a "prototype-based object-unoriented paradigm", rather than the traditional class/instance model. It is also "loosely typed", meaning 1+1 = 11. However, in some earlier versions of Internet Explorer, 1+1 did in fact equal a window. An international trolling organisation called the ECMA, ("European Collective Masturbation Association"), created their own JavaScript virus, called ECMAScript. This now legendary version is used as the basis of several well known viruses, including "ActionScript" used in the trojan horse "Macromedia Flash". For a much more effective virus with which to annoy people, see VBScript.

Object unorientation in JavaScript[edit | edit source]

Even though JavaScript was not invented by Microsoft, its model is still stupid enough to be considered acceptable. JavaScript's most essential feature is objects. Every object in JavaScript has one of two possible orientations: positive and negative. Objects oriented in a positive way have their normal vectors parallel to the object itself and the call:

Object.getUnorientation()

will return a non-real number roughly indicating the current volume of the speakers from the following set:

Objects whose orientation is negative don't have normal vectors at all (although in some rare instances it was observed that the length of all such vectors was no longer than the cord of the mouse). Although using negatively-oriented objects is sometimes not advised, if used properly they could greatly add to the number of bugs in the code - the technique called Proper Object Syntax (POS) or as formally defined in ECMAScript specification: Proper Unorientable Syntax Interface (PUSI). Just as positively oriented objects, negatively oriented objects also support calls in the form:

Object.getUnorientation()

<script language="javascript" type="text/javascript"> alert('This is what an alert message looks like.'); </script>

Calling this method on a negatively oriented surface gives a very desired result of a Segmentation Fault, followed by a Blue Screen of Death. <script language="javascript" type="text/javascript">alert("Hi")</script>

Security using JavaScript[edit | edit source]

As every well-trained web designer knows, the best way to prevent h4x0rS from hacking into your servers is by using JavaScript. Unfortunately, there is a very wide-spread lie that PHP is the right tool for the job, but that is not true. PHP security can be avoided by simple tools such as the popular FireFox extension "noPHP" which simply disables the use of PHP, whereas JavaScript will stop the user from even sending malicious stuff to the server in the first place!!

Debugging JavaScript[edit | edit source]

Another extreme advantage with using JavaScript is its amazing, in-built debugging system. If there is anything wrong with your code, it will promptly give you a message stating which line the error is on, what the problem is, and how to fix it. What it most definitely does NOT do is absolutely nothing while silently just quitting on you. (I mean seriously, thank god that's not the case. otherwise people would have to resort to stuff like putting alert messages LITERALLY EVERYWHERE in order to find the problem.) Another nice feature is a decision by the platform designers to reduce the number of possible confusing error messages by reporting the line number as "0" or "1", regardless of where the error actually occurs in the code.

Anyway embedding JavaScript directly into pages is sometimes useful: true hacker frequently views the html source for express code audit in case JavaScript keeps rejecting even to pass they filled in web form to the sever. Lower mortals in such case call Tech Support.

Portability of JavaScript[edit | edit source]

Unlike its brother language Java, JavaScript is completely assured to work all the time, no matter what OS/architecture/browser is being used. This is due to Microsoft's heroic efforts to bring the whole programming community together by all using the same standards. Back in the day, JavaScript hardly ever worked on any system because all the major browser creators were pitted against each other, trying to each get as many users as possible. Then Bill Gates was like "whoa, dude. this totally has to stop" so he nobly sacrificed Internet Explorer's lead in share of users in order to cooperate with Netscape. Unfortunately there are still a few browsers who do not conform to standards such as Safari, Opera, and Konqerer.

Javascript On Websites[edit | edit source]

Facebook, Twitter, Bebo, Google and many other evil organizations use JavaScript to its full potential. Facebook set up a huge social networking website as addictive as crack, then upped the JavaScript usage in order to cause frustration and anger for its 12,842 users. Bebo has much more activity ever since Facebook was created. The millions of users that were automatically registered to Facebook by importing data from the CIA databases straight into Facebooks databases in order to make it look like Facebook suddenly has thousands of users and eventually get everyont to willingly sign up all rushed back to Bebo once they found out about Facebooks evil schemes (this has not actually happened yet.. this happens in the year 2043, shhh). Unfortunately they were all too late as Bebo had planted the virus on their website as well.

Twitter, the most useless website in the world manages to have non-stop JavaScript running in the background. It's purpose was to waste your bandwidth, otherwise known as "Geeks Gold". Bandwidth is so precious that its name is commonly shortened to b&width to save the second it takes a computer nerd to type 3 letters.

Google has recently upgraded their fully working and perfect websites with a fuckload of JavaScript (hey, what else are they gonna do?). Most noticably on their Google Images pages, giving the slight feel of depression when scrolling down the long, continuous page, trying to focus on tiny images. Useful for looking for porn, though.

Uncyclopedia even uses JavaScript, although this is not by choice. JavaScript comes as a trojan with Wikis. Turning off JavaScript whilst using Uncyclopedia allows people to get around community imposed blocks.

JavaScript Basics[edit | edit source]

Hello world

var App = function() {
    var self = this;
    self.logging = console
}
App.prototype.log = function() {
   https://stackoverflow.com/questions/4539253/what-is-console-log
   this.log = this.logging.log.bind(this);
}
App.prototype.run = function() {
    // FIXME: has to run twice, don't know why
    this.log("Hello world!")
    this.log("Hello world!")
}

Mandatory unit testing

it("Work correctly", () => {
  console.log = jest.fn();
  let app = new App();
  app.run();
  expect(console.log).toHaveBeenCalledWith("Hello world!");
});

How to molest a kitten using JavaScript[edit | edit source]

1. Define the objects in the program:

//the kitten you want to rape
fluffy=new Kitten();

//this is you
you=new Horny_Psychopath();

2. Add in functions:

//use this to find the kitten
function findKitten();
{
 for(kitten in document.kittens) {
  if(document.kittens[kitten].distance == 0) return document.kittens[kitten];
 }
}

//self explanitory
function thrustIn(kitten, object, how_far)
{
 return kitten.appendGenitalia(object, how_far);
}

//self explanitory
function pullOut(object)
{
 return object.parentKitten.removeGenitalia(object);
}

//how to make a quick get away
function runLikeHeck(fromWhat)
{
 while(fromWhat.distance<(99999999999*9999999999999))
 {
  you.run();
 }
}

3. Run the script:

//define yourself
var you = document.getElementsByNameTag("me");
//find the kitten in front of you
var fluffy = findKitten();

//thrust in and out of the kitten until you become tired or spotted
while((you.stamina==notTired) && (you.spotted==false))
{
 thrustIn(fluffy,"6in");
 pullOut(you.cock);
}
//if you get tired or found, remove genitalia and run away
if((you.stamina==tired) || (you.spotted==true))
{
 pullOut(you.cock);
 runLikeHeck(fluffy);
}