Main menu

Pages

JavaScript simple definition and practical applications

 JavaScript, is a programming language that allows you as a programmer or as a user to implement and implement many complex and difficult things and things on different pages. Web and web pages. JavaScript is also the third most popular layer of web technologies, after CSS and HTML.

 JavaScript allows you to create very powerful dynamic and dynamic content and also helps you as a programmer to have great control over multimedia, animations and many other things . It is now showing up in your fat . JavaScript : JavaScript simple definition and practical applications

JavaScript simple definition and practical applications





So , since you got into this topic, you are undoubtedly aware of the importance of JavaScript in websites and you probably want to start learning it . Before proceeding to learn any programming language, you must first know what it is , what it is , how it works, the limits of its powers and uses , whether it is specialized in web or desktop etc.

 that is exactly the purpose of this article by Moriartybgh , which It will be the first step for anyone who wants to start learning JavaScript , get into its details and understand its advantages


What is JavaScript ?


JavaScript is a programming language originally designed to add effects and interactions to web pages, and interactions are anything that gets executed or implemented at the browser level without the need to reload the page . Let's quote for example :


  1.  Hide or show a specific HTML element when another element is clicked.
  2.  Create and move the so-called pointers.
  3.   Perform AJAX operations.
  4.   Validate data in forms or validate forms.
  5.   etc...

We see such interactions on a daily basis when we interact with major platforms and sites like Google and Facebook. When the former suggests a word or phrase when we type a letter or two into it , it does so through JavaScript, and when we browse the Facebook feed, new items are automatically added to the ribbon every time we go there . We scroll to the bottom, and it uses JavaScript to do this and measures what you find and see each day on the sites you visit .


First of all, and before you start learning about JavaScript, I will show you two ways to start using JavaScript , it's very simple, just insert the code into the web page in one of the two ways shown in the picture .


JavaScript simple definition and practical applications



JavaScript Functions


JavaScript , as we said, started as a simple scripting language to add effects to a web page and give it more life , but today the focus of this language has grown. Expanded significantly and covered various areas including :


Create mobile applications as well as desktop applications using modern technologies such as React Native , Ionic and Electron.

JavaScript has high browser support .

 JavaScript has excellent access to the browser document form, so it can be used on the client side as a server .

 Development of games that run in the browser. The games that Facebook now offers on its site, for example , called instant games, are games based on JavaScript. And the dinosaur game that we play even if we don't like it on Chrome when offline is also based on that language .

Background development Since Node.js was first announced in 2009, this announcement has been in my opinion the third birth certificate for JavaScript after its first birth in 1995 by Brendan Eich and its second birth in 2004 with AJAX support .

 JavaScript is a powerful functional programming language that at the same time gives you the ability to write code in a functional programming style. It is an object-oriented language and thus includes the property of supporting objects .



How does JavaScript work


JavaScript is implemented in the browser based on what is known as the JavaScript Engine. The latter reads JavaScript encodings and converts them into machine codes for reading and execution .

This process is done quickly and efficiently through the development of JavaScript engines in many well-known browsers that have come to rely on the JIT compilation method in the process of compiling and converting JavaScript code into machine code .

Google Chrome's V8 engine quickly adopted this mechanism after debuting at the end of 2008 , and subsequently influenced the rest of the browsers , most notably Mozilla Firefox, which also quickly relied on just-build. Under construction. -time . In its Spider Monkey engine to increase the efficiency and performance of web applications, especially since these applications at that time witnessed a qualitative development with the popularization of the use of  AJAX  technology .


 Disadvantages of JavaScript


There are limits surrounded by JavaScript in web browsers that they cannot bypass, and the purpose of working with it is definitely to protect user data and files from accessing a malicious website that can steal your data, for example:

  1.  JavaScript does not allow the client to access, read or write files on the user's computer. Unless the user himself uploads these files to this website by entering a file or by dragging and dropping.
  2.  Even in a browser, JavaScript in a site open in one tab cannot access content from another site in a second tab.
  3.  As a programmer or user, you cannot use JavaScript tutorial in network applications due to the lack of this support.
  4. JavaScript can communicate and exchange data naturally and easily with the site server that sent this page the JavaScript is running on, while this becomes restricted if the two are from different origins. For example, the JavaScript of the Moriartybgh blog cannot send or get data from another site if the latter does not allow it. This policy is known as the Same-origin policy and its purpose is to isolate malicious JavaScript code in a specific domain that you cannot bypass.






Comments

table of contents title