JavaScript Complete Guide in All Languages
What you read on this page:
- Introducing      Javascript
 - History      of JavaScript
 - The      correct pronunciation of Javascript
 - JavaScript      Features
 - How      to run JavaScript?
 - What      languages are at the top of JavaScript?
 - Javascript      frameworks
 - Using      JavaScript
 - The      difference between JavaScript and Java
 - Javascript      development environment
 - Javascript      Examples
 - Server      side programming with JavaScript
 - Build      a mobile app with JavaScript
 - Make      a game with JavaScript
 - Object-oriented      programming in JavaScript
 - Design      Patterns in JavaScript
 - JavaScript      test
 - Familiarity      with Ecma Script
 
Introducing Javascript
JavaScript is a high-level, dynamic, object-based, multi-procedure, and interpretive programming language. This language is often used as part of web pages , the implementation of which allows the client-side script to communicate with the user and create dynamic pages. JavaScript is an interpretive programming language with object-oriented capabilities. JavaScript was first introduced as LiveScript, but Netscape probably renamed it JavaScript because of the excitement it created. JavaScript was first created in Netscape 2.0 in 1995 under the name LiveScript. The language's all-purpose core is embedded in Netscape, Internet Explorer and other web browsers. ECMA-262 Specification defines the standard version of the JavaScript core language. JavaScript 2.0 according to ECMAScript standard version 5The difference between the two is very small. Today, Microsoft's Jetscript and JScript JavaScript comply with the ECMAScript standard, although both languages still support features that are not part of the standard.Javascript is a dynamic scripting programming language that, along with HTML and CSS, is one of the most important elements of standard web technologies. JavaScript enables interactive web pages and is an essential part of web applications. The vast majority of websites use it, and major web browsers use a dedicated JavaScript engine to run it. This language is used by both programmers and object-oriented programmers. In fact, Javascript gives life to web pages. This program allows you to run complex things. Each time the web page displays static information, content updates, interactive maps, two-dimensional or three-dimensional graphics, scrolling video jukeboxes, etc., you can be sure that Javascript is involved. do.
Video PlayerJavaScript engines were only used to run the client side in web browsers, but now in many other types of hosting software, including the server side in web servers and databases, and in non-web applications such as Word and PDF software, Run time is embedded. The terms Vanilla JavaScript and Vanilla JS refer to JavaScript that has not been extended by any additional frameworks or libraries. The scripts written in Vanilla JS are simplified with JavaScript code.
History of JavaScript
Javascript was created in May 1995 by Brendan Eich in 10 days, working for Netscape and currently operating in Mozilla. JavaScript was not always referred to as JavaScript. Its original name was Mocha, the name chosen by Mark Andrison, the founder of NetScape. In September 1995, the name was changed to LiveScript, and then in December of that year, after receiving a trademark license from Sun, the name JavaScript was accepted. From 1996 to 1997, NetSky sent Javascript to ECMA for standardization, which eventually led to the official release of the standardized version called ECMA Script.
The correct pronunciation of Javascript
JavaScript is called "JavaScript", but in Persian it is translated as "JavaScript". For example, the word Java may be written at the end of the line and the word script at the beginning of the next line.
JavaScript Features
Global support
All popular modern web browsers support JavaScript with built-in execution environment.
Commands and structure
JavaScript supports much of the synthesized C programming syntax (for example, if phrases while they are loops, switch phrases, dowhile loops, etc.).
Dynamic
- Type:      JavaScript, like other scripting languages, is dynamically typed. The      type is associated with a value instead of a function. For example, a      variable that is initially limited to a number may be re-assigned to the      string. JavaScript supports a variety of methods for testing object      types, including duck typing.
 - Ran      Time evaluation: JavaScript includes a function Evalthat can execute      phrases presented as strings at runtime.
 
Object-oriented (prototype-based)
The prototype of inheritance in JavaScript by Douglas Crackford is as follows:
You create prototype objects, and then create new ones. Objects in JavaScript can be changed, so we can reinforce new examples and provide them with new contexts and methods. These can then serve as prototypes for newer objects. We don't need classes to make similar objects, objects inherit from objects.
In JavaScript, it is an assembly array object, which is amplified by the prototype. Each string key provides a name for the object property, and there are two syntactic methods for specifying such a name: point marking (obj.x = 10) and bracket symbol (obj ['x'] = 10). A function may be added, returned, or deleted at runtime. Many properties of an object (and any attributes belonging to the inherited chain of the object's prototype) can be for...incounted using a loop . Among the few objects in JavaScript Functionand Datethere.
- Prototypes:      JavaScript uses Prototypes, and many other object-oriented languages use      inheritance classes. Simulation of many class-based features with      prototypes is possible in JavaScript.
 
Function
The function in JavaScript is first-class. The function is considered as an object. In this way, the function may have properties and methods such as ()call.and ()bind.. The nested function is the function defined in the other function. The external function is called each time. In addition, each nested function forms a vocabulary package: the dictionary domain of the external function (including any fixed, local, or variable value variable) becomes part of the internal state of each internal function, even after execution. The external function concludes. JavaScript also supports anonymous functions.
Run Time environment
JavaScript typically relies on a runtime environment (for example, a web browser) to provide objects and methods by which scripts can communicate with the environment (for example, a DOM web page). ). It also depends on the execution environment to enable the script to be inserted / inserted. This is not a language feature in itself, but is common in most JavaScript implementations. JavaScript processes queuing messages together. JavaScript calls the function that comes with each new message, and creates a stack call frame with function arguments and local variables. The call of the stack shrinks and grows according to the needs of the function. When the call to the stack is empty after the function is completed, JavaScript goes to the next message in the queue. This event loop is called the "run to completion" It is described because each message is fully processed before the next message is considered. However, the language synchronization model describes the event loop language as non-blocking: program input / output is done using events and call response functions. For example, this means that JavaScript can process mouse clicks while waiting for a database query to return the information.
Vendor-specific add-ons
JavaScript is officially managed by the Mozilla Foundation, and new language features are added periodically. However, only some JavaScript engines support these new features:
- Receiver      and Function Adjuster Properties (supported by WebKit, Gecko, Opera,      ActionScript and Rhino)
 - catchConditional clauses
 - Repetition      protocol (taken from Python)
 - Deep      Generators-Corutins (Taken from Python)
 - Understand      the generator array and phrases (taken from Python)
 - Suitable      domain for blocks via keyword let
 - Array      and object destruction (limited form of pattern matching)
 
How to run JavaScript?
JavaScript, as a programming language, cannot run on its own. In fact, the browser is responsible for executing the JavaScript code. When a user requests a HTML page with JavaScript, the script is sent to the browser and the browser is responsible for running it. The most important advantage of JavaScript is that all modern web browsers support JavaScript. So, you don't have to worry about your site visitor using Internet Explorer, Google Chrome, Firefox or any other browser. JavaScript will be supported. Also, JavaScript runs on any operating system, including Windows, Linux, or Mac. Therefore, JavaScript overcomes the main disadvantages of VBScript (now depreciated), which is limited to Internet Explorer and Windows only.
The tools you need
To get started, you need to write a text editor to write your own code and a browser to develop your web pages. You can use the text editor you want, including Notepad ++, Visual Studio Code, Sublime Text, Atom, or any other text editor you are comfortable with. You can use any web browser, including Google Chrome, Firefox, Microsoft Edge, Internet Explorer, and more.
A simple JavaScript application
If you store your JavaScript code in the HTML document itself, you must put all your JavaScript code in the tags (<script> and </script>). This will help your browser differentiate its JavaScript code from the rest of the code. Because there are other client-side scripting languages (for example: VBScript), it is recommended that you specify the language you are using. You need to use the type attribute inside the <script> tag and set its value to text / JavaScript like this:
<script type="text/javascript">
What languages are at the top of JavaScript?
Syntax JavaScript is not for everyone. Different people want different characteristics. This is not unexpected, because projects and requirements are different for everyone. Many new languages have appeared, which will be converted to JavaScript before running the browser. Modern tools make conversion very fast and transparent, in fact allowing developers to code in another language and automatically convert it "under the hood".
Examples of such languages:
A "Syntax Sweeper" is for JavaScript. Enough introduces a shorter Syntax script and allows us to write clearer and more accurate code. Usually, Ruby devs love it.
To simplify the development and support of complex systems, the focus is on adding "accurate data typing." Developed by Microsoft.
Flow
It also adds data typing in a different way. Flow was created by Facebook.
It is a standalone language that has its own engine that runs in non-browser environments (such as mobile apps), but can also be transferred to JavaScript. Made by Google. There are more, of course, even if we use one of the deported languages, we need to know JavaScript to really understand what we are doing.
Javascript frameworks
A Run Time Open source and cross-platform environment for JavaScript that executes JavaScript code outside of a browser. Node.js allows developers to use JavaScript to write command line tools and server-side scripting. As a result, Node.js, by integrating web application development around a single programming language, is shown as an example everywhere instead of different languages for server-side and client-side scripts.
JavaScript's most popular library is JQuery, which makes it easy to write client-side scripts in HTML. JQuery is the only JavaScript file that consists of all the DOMs, events, effects, and functions associated with Ajax.
Angular GS is a popular JavaScript framework developed by Google. With Angular, you can create single page programs. Angular framework implements MVC architecture well on the client side (user). Angular uses Html, Css and Javascript and can almost be said to fix their flaws.
In 2013, Jordan Walk released an open source framework and JavaScript called React.js. React is an official JavaScript library, open source, efficient and flexible to create user interface. In MVC architecture, React is used in the display layer. React GS can create applications that are encapsulated and reusable and can be written for different components.
An open source framework, JavaScript, free and client-side designed to develop web applications. Ember.js allows client-side JavaScript applications to be created by providing a complete solution that contains data management and application flow.
Backbone.js is a JavaScript library that is of particular importance in the web development community among other libraries due to its ease of use and simple structure that applies to JavaScript applications.
It is a comprehensive JavaScript framework (JS) consisting of a collection of libraries and packages. But some people call it the Meteor magic. Meteor is based on the concepts of frameworks and other libraries, making it easier to create applications.
A JavaScript Open Source framework is a web development tool for building user interfaces and one-page applications. Unlike other integrated frameworks, Vue is designed from the ground up to be gradually acceptable. The main library is focused only on the display layer and can be easily assembled with other existing libraries or projects. Vue, on the other hand, is also able to use advanced single-page applications when using new libraries and supporting libraries.
Polymer.js is a JavaScript library created by Google that allows you to reuse HTML elements to build applications with components.
Knockout is a JavaScript library that helps you create a database with a basic data model, a responsive display, and user interfaces. You can walk on foot whenever you have parts of the UI that have been dynamically updated (for example, changes due to user actions or when a foreign data source changes). Make it easier to help.
ExtJS is a popular JavaScript framework that provides a rich UI for building cross-browser web applications. ExtJS is based on MVC / MVVM architecture. The latest version of Ext JS 6 is a single platform that can be used for both desktop and mobile applications without the need for different codes for different platforms.
WinJS is a JavaScript open source library that provides helpers to facilitate native Windows Store applications using HTML5 and JavaScript.
It is a JavaScript library that provides many of the applications used by Prototype.js (or Ruby) without extending any of the objects created in JavaScript.
A framework with MVC architecture for Node.js is specifically designed for the rapid development of server side applications in JavaScript. Its service-based architecture provides a variety of components that you can use to sort code and responsibilities separately. It is even possible to develop an application at the organizational level. Since Sailsjs is written in Javascript, it gives you another advantage that you can share your code between the server and the client.
bablejs is a JavaScript transponder that converts code to the old JavaScript ES5 and can run on any browser (even older ones). Bablejs has all the features of Syntax added to JavaScript with ES6 specifications.
Using JavaScript
With technology browsers and personal computers, they have improved to the point where language was needed to create strong web applications. When the user explores a map in Google Maps, the user just has to click and drag the mouse. The full detailed view can be viewed with just one click. This is possible due to JavaScript. Communicates with browsers without sending messages to servers and browsers. JavaScript uses programming interfaces (APIs) that provide extra power for the code.
- Mobility      of elements in web page
 - Upgrade      HTML interfaces
 - Solve      pagination problems
 - Suggesting      results in the search box when you type in it and the results based on      what you have entered so far.
 - High      speed and low JavaScript memory compared to other languages
 - Without      sending a message to the server, it allows everything to happen in the user's      browser.
 - You      can add or change something to your static HTML in the browser.
 
JavaScript is very easy to implement. All you have to do is put your code in the HTML document and tell the browser that this is JavaScript. JavaScript works on web users' computers, even when they are offline. JavaScript enables you to create responsive interfaces, thus providing dynamic capabilities without having to wait for the server to react and display another page. When a user needs to upload content to a document, JavaScript can do this without loading the entire page. JavaScript can try and react to what's happening in your browser. This is called incorrect JavaScript principles and sometimes defensive scripts. JavaScript can help with browser problems and support. For example: Solve CSS layout problems in specific browsers.
Using HTML5 in JavaScript design graphics on the web has become easier. All two-dimensional and three-dimensional shapes can be easily drawn on the canvas, opening the browser as a new medium for all different digital art projects. The canvas has no boundaries and therefore allows the user to create their own art.
JavaScript is the most widely used language because it is used in all possible devices and applications. Using JavaScript provides the Pebble JS library used in smartwatch applications. This framework is used for applications that require the Internet to function. Using Pebbles allows a developer to create a program for a number of hours using JavaScript.
The difference between JavaScript and Java
Although there are similarities between JavaScript and Java, including the name of the language, the syntax, and the relevant standard libraries, the two languages are distinct and very different in design. JavaScript was influenced by programming languages such as Self and Scheme. The JSON serialization format is based on JavaScript for storing data structure in files or transferring them over networks.
Contrary to their nominal similarity, they are quite different from each other. Java is an Object Oriented programming language that runs on several operating systems with an interpreter and is designed and implemented by Sub Microsystems. This programming language was created to produce software that can be used on various platforms. JavaScript, on the other hand, was designed by Netscape and is actually a scripting language. Therefore, it does not require a compilation and compiler process and is run by the Internet browser.
JavaScript restrictions
Client-side JavaScript does not allow you to read or write files. This is for security reasons. JavaScript cannot be used for network applications because there is no such support. JavaScript has no multi-threading or multiprocessor capabilities.
Javascript development environment
Integrated Development Environment (IDE) is an application software that provides complete facilities for computer programmers to develop software. The IDE usually consists of at least one source code editor, automation and debugging tools. Some IDEs, such as NetBeans and Eclipse, contain compilers, translators, or both. Others, such as SharpDevel and Lazarus, do not. The boundary between an IDE and other parts of the software development environment is not well defined. Sometimes a version control system or various tools are integrated to simplify the construction of a graphical user interface (GUI). Many modern IDEs also have class browsers, object browsers, and class hierarchical charts for use in object-oriented software development.
Visual Studio Code is a free, multi-platform, ultra-fast, and lightweight code editor developed by Microsoft for Windows, Linux, and Mac. Visual studio code is based on the Electron framework, which is used to build multi-platform desktop software using web technologies. It is also used to deploy Node.js applications to run on the desktop on the Blink design engine.
WebStorm is a complete editor for web developers and a complete IDE that provides all the tools and features for JavaScript, Typescript, NodeJS, and of course HTML and CSS developers. WebStorm is built on top of the open source IntelliJ platform.
Vim or Vi Improved is a text editor for programmers that is compatible with Vi and is especially suitable for editing programs. Used using a command line interface as well as a standalone application with a graphical user interface.
Emacs Text Editor offers a variety of content-sensitive modes for plain text, source code programming, and HTML code. Such modes have a highlight syntax that uses different colors to highlight different elements of the syntax (such as loops, comments, variables, etc.). This feature can make the program code easier and faster to read and thus develop faster. Emacs is more than a text editor, it can also execute shell commands, access the Internet, write and test applications , and read and send emails in the Emacs environment.
Most developers consider NetBeans IDE to be the original and free Java Eternal IDE. NetBeans IDE supports multiple languages (PHP, JavaFX, C ++ / C, JavaScript, etc.) and framework. NetBeans is an open source project dedicated to developing software development software (NetBeans IDE and NetBeans platform) to meet the needs of developers, users and businesses that rely on NetBeans as a basis for their products. , answers. In particular, it enables them to develop these products faster, more efficiently and more easily, using the strengths of the Java platform and other relevant industry standards.
Visual Studio is a complete set of development tools for building ASP.NET web applications, XML web services, desktop applications, and mobile applications. Visual Basic, Visual C, and Visual C ++ all use an integrated development environment (IDE) that makes it easy to share tools and create mixed language solutions. Microsoft Visual Studio is used as an integrated software development environment used to develop computer applications for Microsoft Windows, as well as websites, web applications, and web services.
Adobe has developed software for designing a website called Dreamweaver. Without installing any other software, you can easily design a website with Dreamweaver. This app is quite smart and easy to work with. That's why it's not necessary to memorize all the code and edit the wrong words. With the HTML language, the pages of the site can be designed and created based on statics or dynamics, and using the FTP option in the software, the created pages can be transferred to the host.
Other development environments include:
- PhpStorm
 - Atom
 - Komodo      IDE
 - ++      Notepad
 - Angular      IDE
 
Javascript Examples
Below is an example of a web page with JavaScript standards (using HTML 5) and DOM:
<!DOCTYPE html>
<html>
  <head>
    <title>Example</title>
  </head>
  <body>
    <button id="hellobutton">Hello</button>
    <script>
        document.getElementById('hellobutton').onclick = function() {
            alert('Hello world!');                    // Show a dialog
            var myTextNode = document.createTextNode('Some new words.');
            document.body.appendChild(myTextNode);    // Append "Some new words" to the page
        };
    </script>
  </body>
</html>
This sample code shows the various features of JavaScript.
/* Finds the lowest common multiple (LCM) of two numbers */
function LCMCalculator(x, y) { // constructor function
    let checkInt = function(x) { // inner function
        if (x % 1 !== 0)
            throw new TypeError(x + "is not an integer"); // var a =  mouseX
        return x;
    };
    this.a = checkInt(x)
    //   semicolons   ^^^^  are optional, a newline is enough
    this.b = checkInt(y);
}
// The prototype of object instances created by a constructor is
// that constructor's "prototype" property.
LCMCalculator.prototype = { // object literal
    constructor: LCMCalculator, // when reassigning a prototype, set the constructor property appropriately
    gcd: function() { // method that calculates the greatest common divisor
        // Euclidean algorithm:
        let a = Math.abs(this.a), b = Math.abs(this.b), t;
        if (a < b) {
            // swap variables
            // t = b; b = a; a = t;
            [a, b] = [b, a]; // swap using destructuring assignment (ES6)
        }
        while (b !== 0) {
            t = b;
            b = a % b;
            a = t;
        }
        // Only need to calculate GCD once, so "redefine" this method.
        // (Actually not redefinition—it's defined on the instance itself,
        // so that this.gcd refers to this "redefinition" instead of LCMCalculator.prototype.gcd.
        // Note that this leads to a wrong result if the LCMCalculator object members "a" and/or "b" are altered afterwards.)
        // Also, 'gcd' === "gcd", this['gcd'] === this.gcd
        this['gcd'] = function() {
            return a;
        };
        return a;
    },
    // Object property names can be specified by strings delimited by double (") or single (') quotes.
    lcm: function() {
        // Variable names do not collide with object properties, e.g., |lcm| is not |this.lcm|.
        // not using |this.a*this.b| to avoid FP precision issues
        let lcm = this.a / this.gcd() * this.b;
        // Only need to calculate lcm once, so "redefine" this method.
        this.lcm = function() {
            return lcm;
        };
        return lcm;
    },
    toString: function() {
        return "LCMCalculator: a = " + this.a + ", b = " + this.b;
    }
};
// Define generic output function; this implementation only works for Web browsers
function output(x) {
    document.body.appendChild(document.createTextNode(x));
    document.body.appendChild(document.createElement('br'));
}
// Note: Array's map() and forEach() are defined in JavaScript 1.6.
// They are used here to demonstrate JavaScript's inherent functional nature.
[
    [25, 55],
    [21, 56],
    [22, 58],
    [28, 56]
].map(function(pair) { // array literal + mapping function
    return new LCMCalculator(pair[0], pair[1]);
}).sort((a, b) => a.lcm() - b.lcm()) // sort with this comparative function; => is a shorthand form of a function, called "arrow function"
    .forEach(printResult);
function printResult(obj) {
    output(obj + ", gcd = " + obj.gcd() + ", lcm = " + obj.lcm());
}
Server side programming with JavaScript
Server applications
Node JS was created to build fast and scalable network applications during Javascript Chrome. The program uses applications that are light and efficient and must be distributed to systems using a server. Javascript is used to handle HTTP requests and generate content. When the user is writing applications in JavaScript on the client, the user may even write logic in JavaScript on the server to make cognitive leaps from one language to another.
Web server
You can create a web server using ninety GS. One of the advantages of Node JS is that it is event-oriented and will not wait for a previous call response. It is transferred to the next call and uses events when an answer is received for the previous call. Servers built on Node JS are very fast and do not use buffer and data transfer.
Client-side JavaScript
Client-side JavaScript is the most common form of language. The script must be encrypted or referenced with the HTML document for the code interpreted by the browser. This means that the web page should not be static HTML, but can include applications that interact with the user, control the browser, and create dynamic HTML content. The JavaScript client side mechanism has many advantages over CGI server side scripts. For example, you may use JavaScript to check if the user has entered a valid email address in the form field. JavaScript code is executed when the user executes the form, and can only be transferred to the web server if all inputs are valid. JavaScript can be used to review events created by users, such as click buttons, link navigation, and other actions that the user takes explicitly or implicitly.
Build a mobile app with JavaScript
The most important thing that can be done with JavaScript is to build applications without web fields. Mobile phones, which mostly have two different operating systems in Apple and Android, are used to make these items. Write the program once and use it on both operating systems of these devices. Von Gap is a framework that makes this possible. We also have a recent React Act that serves this purpose. Therefore, using Javascript, it can be used to deploy and load related programs in intersecting environments.
Cordova Framework is a mobile application development that can be used to create multi-platform mobile applications with CSS, HTML5 and JavaScript. Cross-platform means that you can write the application code once and on several mobile operating systems such as Android , iOSOr run Windows Phone. Apache Cordova is a mobile application development framework developed by Nitubi. Adobe Systems acquired Nitubi in 2011, re-introduced it as PhoneGap, and later released an open source version of software called Apache Cordova. Apache Cordova allows software developers to create applications for mobile devices using CSS, HTML, and JavaScript instead of relying on specific APIs for the operating system. Expands HTML and JavaScript features for working with the device. The resulting applications are hybrids, because the applications are done via the web instead of the operating system's native UI framework, and not in the sense that they are completely web-based because they are not just web applications but as distribution programs. And access to the APIs of the packaged device.
Make a game with JavaScript
Not only for the website but also the use of JavaScript helps to create games for leisure. The combination of JavaScript and HTML5 makes JavaScript popular in game development. The library offers Ease JS, which offers simple solutions for working with rich graphics. It also has an API that is familiar with the hierarchical display list for all-flash developers. The user can create a Stage and display the display list to the desired canvas. Ease JS also has two-dimensional byte maps called Sprites, which are drawn directly to present the purpose for the changes.
Some of the best game development frameworks for JavaScript:
Construct2 is a 2D HTML5-based game editor developed by Scirra Ltd. The purpose of Creating a Construct is to allow non-programmers to create and release games using a visual editor and a behavioral logic system. The main method of programming games and applications in Construct is through "event sheets", which are similar to source files in programming languages. Programs to support JavaScript were announced as an optional scripting language in 2019 according to the needs of advanced users and the popularity of existing solutions. Construct's main output platforms are HTML5-based.
Phaser is an HTML5 game framework designed to help developers create cross-browser HTML5 games. Phaser allows you to play full 2D games on a browser with little knowledge of game development or JavaScript to design a browser in general.
Object-oriented programming in JavaScript
Object Oriented Programming (OOP) refers to the use of single codes to develop applications. Objects are used as building blocks for applications. Building applications with objects allows us to adopt some valuable techniques, namely heredity, polymorphism and encapsulation.
Investigating Encapsulation and Inheritance
Objects can be considered as the main actors of the program or simply the main "things" or building blocks that do all the work. As you know now, objects are everywhere in JavaScript because every component in JavaScript is an Object, including functions, strings, and numbers. We typically use the word object or constructor functions to create objects.
Encapsulation is to enclose all the properties of an object in that object so that the internal functions of the object (its methods and properties) are hidden from the rest of the program. This allows us to abstract or localize a specific set of features in objects. Inheritance is an object that can inherit parental object methods and characteristics (class in other OOP languages or a function in JavaScript). Both of these concepts, enclosure and inheritance, are important because they allow us to create applications with reusable code, scalable architecture, and abstract features.
Design Patterns in JavaScript
As a good JavaScript developer , you try to write clean, healthy and quality code. You solve interesting challenges that, although unique, do not necessarily require unique solutions. You've probably written a code yourself that looks like you've solved a completely different problem before. You may not know it, but you've used the JavaScript design template. Design patterns are reusable solutions to common software design problems.
Some of the basic design patterns of JavaScript are:
- Constructive      pattern
 - Sample      pattern
 - Module      model
 - Singleton      pattern
 - Factory      pattern
 - Supervisor      pattern
 
JavaScript test
Tests can be performed by creating HTML pages with test libraries and tests in JS files in the browser. Experiments can also be performed on Node.js by entering tests and related libraries. jsdom is commonly used in Node.js to simulate an environment such as a browser using pure JavaScript. It provides windows, documents, wind, location, cookies, selectors, and anything else you can when you run your JS in the browser, but it doesn't give anything real. This is different from "headless mode" because you need a real browser for headless mode and unlike jsdom you can even take photos. We recommend the second method (Node.js + jsdom) because it is much faster than running tests in the browser. The first method may be more reliable because you use the same exact software that your site offers in real life.
Familiarity with Ecma Script
JavaScript is standardized in Ecma International اروپا The European Union for Standardization of Information and Communication Systems (ECMA stands for European Computer Manufacturers Association) to provide a standard JavaScript-based programming language. This standard version of JavaScript, called EcmaScript, works the same on all programs that support the standard. Companies can use the open language standard to develop their JavaScript. The EcmaScript standard is documented in the ECMA-262 specifications.
EcmaScript Specifications is a set of requirements for implementing EcmaScript; If you want to implement standard language-compatible language features in the implementation of your Akma script or engine (such as SpiderMonkey in Firefox or v8 in Chrome), it's helpful.
ECMAScript is commonly used for client-side scripting on the World Wide Web, and is increasingly being used to write programs and server services using Node.js. ECMAScript language includes structural, dynamic, functional, and prototype-based features. ES6 has introduced a new mode for defining functions, the so-called "arrow functions". In ES5, the function is defined as follows:
var readWikiArticle = function(content) {
    // Read it!
};
While in ES6, using the new syntax arrow function is as follows:
var readWikiArticle = (content) => {
    //Read article!
};
Did you like this post?


