Skip to content

Commit e8b2f1e

Browse files
Add files via upload
0 parents  commit e8b2f1e

3 files changed

+98
-0
lines changed

The History of JavaScript.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# The History of JavaScript
2+
3+
JavaScript is a high-level multi-paradigm programming language and it's under constant development and new features and improvements are always being added into JavaScript.
4+
5+
In 1995, websites were totally different from the ones that we use now. They were just plain text files mostly and people used an old web browser called `Netscape Navigator` to view these websites.
6+
7+
Netscape Navigator was the Google Chrome of it's time having more than 85% of the web browser market share. The founder of Netscape, Marc Andreessen wanted that the world wide web should be more than just simple text files.
8+
9+
He wanted to make websites dynamic and for achieving this Mark needed a programming language which could be used by both designers and developers.
10+
11+
For fulfilling this vision of his, Netscape hired a developer named Brendan Eich to add the `scheme` programming language into the Netscape Navigator.
12+
13+
Before Eich could complete his task Netscape joined `Sun Microsystems` to work on their new programming language called `Java`
14+
15+
Sun Microsystems wanted to make their new language available for web browsers and Netscape wanted a simple and easy scripting language that even designers can use but Java wasn't easy to learn.
16+
17+
Java wasn't the type of language that Netscape wanted and then they created a new language called `Moca.` Moca was later renamed to JavaScript because of the collaboration between Netscape and Sun Microsystems they decided that JavaScript and Java both should have a similar syntax.
18+
19+
# Microsoft and JavaScript
20+
21+
Brendan created the first version of JavaScript in just ten days. It had the object orientation of `Smalltalk` and the syntax of Java.
22+
23+
Microsoft began noticing the popularity of JavaScript since it was easy to learn and was getting more popular. Microsoft created their own version of JavaScript called `JScript` that only worked on `Internet Explorer`
24+
25+
JScript was same as JavaScript but had a slightly different way of implementing things. Which led to bigger problem than expected.Websites that were built using JavaScript worked best on Netscape Navigator and websites built with JScript worked best on Internet Explorer.
26+
27+
Developers had to add a best viewed in Internet Explorer/Netscape Navigator badges to their websites who couldn't build for both platforms.
28+
29+
# ECMAScript and the TC39
30+
31+
ECMA international is an industry association founded in 1961, which is dedicated to standardize the communication and information systems. In November 1996 Netscape handed over JavaScript to ECMA to build a standard implementation of the language.
32+
33+
This made the evolution of JavaScript easier and consistent across all vendors and implementors. ECMA is the governing body that standardizes JavaScript versions so that they are same across all web browsers.
34+
35+
Each new specification comes with a standard and a committee. JavaScript has the ECMA-262 standard and the committee which works on ECMA-262 is called TC39.
36+
37+
Oracle owns the trademark for the name JavaScript, so to avoid any legal issues ECMA calls JavaScript ECMAScript. The name ECMAScript is used for the official standard of the ECMA-262 while JavaScript is used while talking about the language in practice.
38+
39+
TC39 stands for technical committee-39. Which consists of members who are generally browser vendors or companies who have invested highly into the language, such as Facebook(Meta) and PayPal. Companies that are part of the TC39 send delegates who represents their companies at the TC39 meetings. These delegates are the ones who are responsible for creating, approving, or denying any feature that has been proposed to be added to the language.
40+
41+
Since 2016 ECMAScript has been releasing new features that have passed the criteria and adding them to the official spec. Each version is named with ES followed by the version number. ES6 was released in 2015 which added many new features to the language. Before 2015 the last update to ECMAScript was in 2011 which was called ES5.
42+
43+
# Adding new features to JavaScript
44+
45+
Whenever a member of the TC39 wants to add or improve a feature in JavaScript they have to submit a proposal to ECMA and the proposal is accepted only when it has gone through the five steps that determine that whether the feature should be added or not.
46+
47+
- **Stage Zero:** At this stage proposals are those that are planned to be presented to the committee or have not been rejected but do not meet the criteria to move to the next stage.
48+
- **Stage One:** In order for any proposal to advance to stage one it must be presented by an official champion of the TC39 at the meeting who is responsible for the proposal and also define the problems it solves of the language and illustrative example along with a high level API example while also highlighting any potential concerns and implementation challenges.
49+
- **Stage Two:** At the second stage, the proposed feature could become a part of the official spec of the language and the proposal should have an easy to read syntax and semantics of the feature in formal language. The proposal should also have a first version that is written in the official language specification.
50+
- **Stage Three:** Stage three is where the proposal is mostly finished and just requires feedback from the users and implementors, In order for a proposal to reach this stage the specifications of the proposal should be finished and implementations should be created.
51+
- **Stage Four:** At the final stage the proposal is ready to be included into the specification of the language but requires complete written test about the proposal it should have two or more specification implementation should pass through those tests and the members have practical experience with the feature and the ECMAScript editor must sign off on the specifications.

What is JavaScript.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# What is JavaScript
2+
3+
JavaScript is a high-level object-oriented multi-paradigm programming language. A programming language is a language that we use to write code which helps us to instruct our computer about the tasks it needs to perform.
4+
5+
JavaScript is high-level language which means that we don't need to worry about memory allocation and other complex things. Being a high-level language JavaScript is easier for humans to read and understand.
6+
7+
JavaScript is based around the concept of objects and they are the core building blocks of the language. JavaScript also supports multiple programming paradigms meaning that we can use different types of programming styles to write our code.
8+
9+
JavaScript is mostly used for web development along with HTML and CSS. These three technologies are the core fundamentals of creating great web applications.
10+
11+
HTML is used to structure the contents of the website, CSS is used for styling while JavaScript is used to add functionality to our web application. JavaScript can be used to create almost any type of application and not just web applications. We can use it to create mobile apps, desktop apps as well as run it on our back-end servers.
12+
13+
> There isn't anything you can't build with JavaScript.

loops-and-prototypes.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## For-of loop
2+
3+
The for-of loop is a new loop introduced in JavaScript. It is not supported in Internet explorer and works well in other modern browsers. The for-of loop has a clean syntax and is used for iterating over arrays and strings.
4+
5+
The for-of loop is a great way to iterate over arrays or objects but if you need to iterate over an array while also keeping in mind the index of the values then the regular for loop is what you require
6+
7+
```js
8+
let fruitsBasket =["apple","banana","orange","mango","pineapple"]
9+
for(let fruit of fruitsBasket){ console.log(fruit); }
10+
```
11+
12+
## For-in loop
13+
14+
The for-in loop is used to iterate over the properties or keys in an object.
15+
16+
The main difference between the for-of and the for-in loop is that the for-of loop iterates over the actual value of the array or object that it's being iterated over and the for-in loop only iterates over the keys of the array or object.
17+
18+
```js
19+
const users = {
20+
bob : 22,
21+
sally: 25,
22+
jake: 33 }
23+
for(let user in users){
24+
console.log(user);
25+
console.log(users[user]); }
26+
```
27+
28+
## Prototypes
29+
30+
According to the MDN docs:
31+
32+
> Prototypes are the mechanism by which JavaScript objects inherit features from on another.
33+
34+
Each object can have a prototype which acts as a template. Certain objects like arrays don't have methods like pop or push. These methods are stored in the __proto__ property that references all the methods from the arrays prototype.

0 commit comments

Comments
 (0)