I am not too experienced with the JavaScript programming language at the moment, but I still know a somewhat good amount. This document will go over my knowledge of the JavaScript programming language so far.
This document uses version 1.8 of the JavaScript programming language. The version will NOT be listed with each example.
A simple Hello world program to print out to the web console
console.log("Hello WorldWideWeb!");
(i) This example has been tested yet, and works.
Variables in JavaScript
var x = 2
var y = 16
console.log(2**16);
/!\ This example has not been tested yet, and may not work
The break keyword in JavaScript
console.log("Break time!");
break;
/!\ This example has not been tested yet, and may not work. I still don't know exactly what the break
keyword does
Functions in JavaScript
function aFunctionalFunction {
console.log("A functional function has finished functioning.");
break;
}
return aFunctionalFunction();
/!\ This example has not been tested yet, and may not work
Returning in JavaScript
function aFunctionalFunction {
console.log("A functional function has finished functioning.");
break;
}
return aFunctionalFunction();
/!\ This example has not been tested yet, and may not work
The alert command creates an alerting dialogue box.
alert("Alert! The alert dialog box is now present");
break;
/!\ This example has not been tested yet, and may not work
Spamming this function can result in a checkmarkable option to stop displaying popups, as they can get annoying.
var x = bool(true)
function alertAlot {
while (x == true) {
alert("I am an alert");
break;
}
}
return alerAlot();
break;
/!\ This example has not been tested yet, and may not work
Comments in JavaScript are identical to comments in C or C++.
// This is a single line comment
/* This
is a multiline
comment */
/* Multi-line comments
* can also
* be written
* like this */
Here is an example of a for
loop in JavaScript:
let x = 0;
for x in range(1,10) {
console.log(x);
}
I am not sure if JavaScript supports the range
keyword in the same way that Python does.
/!\ This example has not been tested yet, and may not work
Here is an example of a while
loop in JavaScript
let x = -16;
while x > 0 {
console.log(x)
x == x + 1;
}
/!\ This example has not been tested yet, and may not work
Section coming soon
Section coming soon
Classes are a feature in JavaScript. The way I know them, they are extremely similar to other languages. At the moment, I don't see much purpose in classes, so I am likely missing something and need to find out what.
class superClass {
console.log("Superclass says Hello");
}
This example is going to include HTML alongside JavaScript. The 2 languages work strongly together (along with CSS), so this shouldn't be surprising.
Here is the JavaScript portion:
function javaScript {
console.log("Object.OnClick activated, alerting message is going to be sent. If you didn't receive the message, you may have disabled dialog boxes for this page.");
alert("Hello HTML, from JavaScript");
}
object.onclick = function(){javaScript};
Here is the HTML5 portion:
<HTML>
<button>Click me!<element onclick="myScript">
</HTML>
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
Section coming soon
The blink tag requires HTML, CSS, AND JavaScript to work. The tag was deprecated, as it was too annoying, and disruptive, but most web browsers still support it.
// JQuery example
setInterval(function(){
$('blink').each(function() {
$(this).toggle();
});
}, 250);
// Vanilla JavaScript example
(function() {
var blinks = document.getElementsByTagName('blink');
var visibility = 'hidden';
window.setInterval(function() {
for (var i = blinks.length - 1; i >= 0; i--) {
blinks[i].style.visibility = visibility;
}
visibility = (visibility === 'visible') ? 'hidden' : 'visible';
}, 250);
})();
Several pieces of knowledge have not been added yet, including:
-
Hello World
-
Break
-
Functions
-
Return
-
Alert
-
Recursive alert
-
For loop
-
While loop
-
If statement
-
Drawing (various)
-
Classes
-
OnClick
-
Booleans
-
Integers
-
Strings
-
Concatenation
-
Tuples
-
Lists
-
Comments
-
Let keyword
-
Operators
-
Const variables (cannot be altered)
-
Embedding in HTML
-
Linking to HTML
-
JavaScript math
-
JavaScript dates
-
Math.random
-
Else statement
And much more
Most of my JavaScript knowledge at the moment comes from example, W3Schools, experimentation through a consistent 1.5 year period (2019-2021) using Firefox, and also some from Wikipedia.
-
JavaScript uses the
*.js
file extension by default, but has the less common extensions*.mjs
and*.cjs
-
Several browsers block JavaScript due to abuse and privacy concerns. GNU criticizes JavaScript, and calls certain sites that use it "non-free JavaScript" this has made me like JavaScript less
-
JavaScript has several toolchains and software compilers for it, including Gulp, Node.js, Vue.js, AngularJS, Electron, ProcessingJS, etc. (these are all the ones I know of) When none is used, it is known as vanilla JavaScript
-
JavaScript is NOT to be confused with Java
-
Microsoft had an early implementation of JavaScript of their own that they call JScript. It evolved into JScript.NET
-
JavaScript is one of the 3 standard languages for developing webpages (HTML5, CSS3, JavaScript) although it isn't always required, and other languages (such as PHP, Python, Ruby, etc.) can be used as well/instead
-
JavaScript++ is an implementation of JavaScript that adds features of C++ to JavaScript
-
JavaScript is a semicolon and curly bracket language
-
Brendan Eich invented JavaScript
-
NetScape developed a technology known as JSSS (JavaScript Style Sheets) in the 1990s, but it never caught on, but introduced several features to CSS
-
ECMAScript is the standardization language of JavaScript
-
JQuery is a common JavaScript library for graphics
-
BackboneJS is a minimal JavaScript library
-
JavaScript is noted in the programmer community as one of the most difficult programming languages in terms of absurdity, but may still be less complicated than C++ or Assembly in terms of complexity (Brainfuck and other Esotoric languages are not included here, as they are on a whole 'nother level) For JavaScript insanity examples, see WTFJS for detailed examples
-
WebGL is a JavaScript library used for 3D modeling within any standard/unstandard (Google Chrome/Google Chromium, Safari) web browser
-
No other knowledge of JavaScript
This list was abandoned for a few months (not even being looked at from 2022 January 14th to 2022 April 18th) I have come back to it on 2022, April 19th, due to renewed interest in programming language knowledge repositories. I intend to keep as much of the original structure as possible, while also adding new knowledge. This is a legacy document, and was written differently than how I have been writing these types lately. Legacy parts (such as variables in <language>
sections) will remain unchanged, while improvements will take place (notably: fixing the JavaScript comments example, adding new other knowledge of JavaScript
adding the developer notes section, referencing the JavaScript logo, adding sources, adding a file version timestamp, changing all level 4 headers to level 2, and changing the title header from level 3 to level 1)
When this list goes public, it will still be incomplete, and will not be regarded as a complete entry.
File version: 1 (2022, Tuesday, April 19th at 7:16 pm PST)
- Prepared 1 day early