JavaScript Tutorial Summary
DAY 1

JavaScript Tutorial Summary

This article is a summary of what I learned today (See the published date) about Javascript. The content here is fundamental to the understanding of this language for every aspiring Web/App Developer and of course Software engineers. Similar contents will be shared daily as I learn from scratch and advance to a Pro stage in understanding Javascript.

What is JavaScript?

JavaScript is an open-source and most popular client-side scripting language supported by all browsers. It is mainly used for enhancing the interaction of the webpage with users by making it more lively and interactive. It is also used for game development and mobile application development.

Brief History

JavaScript was developed by Brendan Eich in 1995, which appeared in Netscape, a popular browser of that time. The language was initially called LiveScript and was later renamed JavaScript. There are many programmers who think that JavaScript and?Java?are the same. In fact,?JavaScript and Java are very much unrelated. Java is a very complex programming language whereas JavaScript is only a scripting language. The syntax of JavaScript is mostly influenced by the programming language C.

How is JavaScript Run?

Being a scripting language,?JavaScript cannot run on its own. Hence, the browser is responsible for running JavaScript code.

When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it is up to the browser to execute it. The main advantage of JavaScript is that?all modern web browsers support?JavaScript. So, you do not have to worry about whether your site visitor uses 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. Thus, JavaScript overcomes the main disadvantages of?VBScript?(Now deprecated) which is limited to just IE and Windows.

A Simple JavaScript Program

JavaScript code is placed within?<script> tags?(<script></script>) if you are keeping your JavaScript code within the HTML document itself. This helps your browser distinguish your JavaScript code from the rest of the code. As there are other client-side scripting languages (Example: VBScript), it is highly recommended that you specify the scripting language you use. You have to use the type attribute within the <script> tag and set its value to text/javascript like this:

<script type="text/javascript">        

However, where javascript is to be specified in an external sheet, use the <script src""</script>

Example;

<script src="Script.js" type="text/javascript"></script>        

How do JavaScript engines work?

JavaScript Engines are complicated. But it works on some simple basics:

  • The engine reads (“parses:) the script.
  • Then it converts or compiles the script into the machine language.
  • After that machine code runs.

Here, the JavaScript engine applies optimizations at each step of the process. It reads a compiled script and analyzes the data that passes in the JavaScript engine. After that, it applies optimizations to the machine code from that acquired knowledge. When this process is completed, scripts run quite fast.

Javascript offers advantages like:

  • Show dynamic content based on the user profile.
  • React to user’s operations, like mouse click events, key presses, or pointer movements.
  • Support features like auto-validated form entries and interactive drop-down menus.
  • Send requests to remote servers, Upload and download files.
  • JavaScript code can also create movement and sound
  • Ask questions to the users, Get and set cookies, show messages, and switch browser tabs.
  • Allows the data to be stored in the local storage.

What makes JavaScript unique?

The following most important features make JavaScript unique.

  • It offers full integration with HTML/CSS.
  • Simple things are done quickly without any complications or following strict rules.
  • Supported by all major browsers and JavaScript is enabled by default.
  • It does not function in a particular environment like other programming languages. Example Python, Django, etc
  • It is not restricted to sophisticated code editors. It runs even on your computer's notepad.

Alternatives to JavaScript

The syntax of JavaScript is not suited for everyone as different project demands different features. However, some modern tools like a Coffee script, Typescript, and Dart allow developers to code in another language and then auto-convert into the JavaScript code.

Why learn JavaScript Programming Language?

JavaScript is the most popular client-side programming language which is widely used for web application development in every industry. There is a huge demand in the IT industry for candidates having knowledge of JavaScript. Therefore, learning JavaScript is beneficial for you to get a good job and also enhance your skills and knowledge as well.

Where is JavaScript Today?

ECMAScript is a specification governed by ECMA international aimed at standardizing JavaScript. The latest version is ECMA9 also called JavaScript 9. It is supported by all major browsers like Chrome, Firefox, Internet Explorer, etc. Though each browser has an array of unique commands that are not part of the standards.

In all, the following tips are worthy of note;

  1. JavaScript is a?client-side scripting language?developed by Brendan Eich.
  2. JavaScript can be?run on any operating systems?and almost all web browsers.
  3. You need a text editor to write JavaScript code and a browser to display your web page.

要查看或添加评论,请登录

Solomon Iniodu的更多文章

  • Day 6/25: Mastering Application Security with Amazon Cognito

    Day 6/25: Mastering Application Security with Amazon Cognito

    Today was a deep dive into the world of cloud application security as I explored how to secure web applications using…

  • Bridging Gaps with Local Service Finder: Our Journey from Concept to Completion

    Bridging Gaps with Local Service Finder: Our Journey from Concept to Completion

    At the culmination of our 14-month Software Engineering Program with ALX Cohort 9, our team has proudly developed and…

  • Flyit

    Flyit

    Project Overview Traveling by air can be an exciting experience, but it can also be quite overwhelming. From booking…

  • Some PHP fun-facts

    Some PHP fun-facts

    Overview The term PHP is an acronym for Hypertext Preprocessor. PHP is a server-side scripting language designed…

  • Major Tools You Don't Want to Ignore as a Full Stack Developer in 2022

    Major Tools You Don't Want to Ignore as a Full Stack Developer in 2022

    There are a ton of full-stack developer tools. From IDEs to project management apps, you’ll find a plethora of options…

  • One trick you should know when working with the"typeof" operator in Javascript

    One trick you should know when working with the"typeof" operator in Javascript

    JavaScript has 5 different data types that can contain values: string number boolean object function The "typeof"…

  • Top 10 Popular Programming Languages And Their Creators

    Top 10 Popular Programming Languages And Their Creators

    Obviously, in the tech space today, we've come to terms with most programming languages. you know what they do, but do…

  • Basics of JavaScript

    Basics of JavaScript

    Overview JavaScript is a programming language that adds interactivity to your website. This happens in games, in the…

  • JavaScript Output

    JavaScript Output

    What is Javascript Output? JavaScript Output defines the ways to display the output of a given code. The process of…

  • CSS Variables - The var() Function

    CSS Variables - The var() Function

    One feature that was on CSS wish lists long before it became a standard is CSS Variables, officially referred to as CSS…

    2 条评论

社区洞察

其他会员也浏览了