Dive Deeper into Nodejs - JavaScript & ECMAScript

Karim Muhammad
Nov 13, 2023
3 min read
post_comment1 Comments
post_like1 Likes


JavaScript is a scripting language was designed byBrendan Eich, and it is one of the core technologiesWWW(Word Wide Web) which was shined thanks toTim Berners-Leeand his teamsCERNwhich made a backbone forWWW.

Brendan Eichcreated JavaScript Language in few days - 10 days!

#ECMA International

Non-profit standards organization which put rules and standards for programming languages, the organization was founded in 1961 to standardizecomputer systems in Europe in general.

of course 10 days was not enough to build a strong language...

Netscape - in whichBrendan Eichwork - submitted JavaScript intoecma international, as starting point for a standard specification that all browser vendors could conform to, and first edition released in june calledECMAScript!

this helped browser to run javascript fine in its own engine; because It's standardized!

noteecma internationalit put standards for many things not only Javascript e.g XML, JSON, Embeded systems, etc...


#What Is ECMAScript?

It is set of rules which organization defines.

Set of rules like what??!

  • Functions
  • Constants
  • Data Structure
  • Algorithms
  • etc..

JavaScript is a high-level, oftenjust-in-time compiledlanguage that conforms to the ECMAScript standard, It hasdynamic typing,prototype-basedobject-orientation, andfirst-class functions. It ismulti-paradigm, supportingevent-driven, functional, andimperative programmingstyles. It has application programming interfaces(APIs)for working withtext,dates, regular expressions, standarddata structures, and theDocument Object Model(DOM).

this organization(ecma international) just define features for making all browsers to implement it in thier own JavaScript Engine, to work Javascript fine.

and each engine completely free how to implement it, but is should works at the end as expected.

Let's give an Example.

ecma internationalannounced new rule calledBlobArray(i'm just give an example) so now all browsers must implement thisdata structurein thier own engine.. for example engine of Mozilla is called "SpiderMonkey" and engine of Google is called "V8".

so thatjavascriptcan works in all browsers fine, but may some features works in some browser(engine) and some not (havn't implemented yet for example in this engine) like in case Google's engine and Internet Explorer's engine.

and you may notice some performance when run JS in different engines as well!

ECMAScript ecmascript feature

see! it define feature and what should return.

but for implementing it, it just display pesudo-code, not real implementation.

#Why all of that?

next article - Insha allah - will be about "New/Custom Features Javascript".

as we learned, Javascript's Features is defined by the oragnization, and should developersV8Implement these features to makeV8compile these features.

and as we learned from previous article is ...V8 Engineis Open Source, so can anyone use it and add more features on it!

and that's what creator of nodejs did! he did takeV8and embeded it in his software program and added more features (C/C++ code,JS code), and boom! NodeJS.

added features likereading file,http,communication protocols, and others...

so that next article we will learn how to add your own features in javascript language and compiled fine byV8!

nodejs and v8 together


#nodejs #javascript #part2

You are not logged in.