Learn Javascript Basics and Fundamentals | How Javascript works

Understanding the Javascript

Lesson Details:
October 20, 2021


I: Introduction

A: Introduction to programming coding languages

Programming is the act or art of creating a sequence of instructions that tells the computer what to do. It allows the user to tell the computer what the person wants it to do, and how to do it. The instructions are written in programming languages using characters, numbers, and symbols. Programming is used in many different fields like game design, web site design, computer animation, etc.

The first programming language (Pascal) was developed in 1970 by Professor Niklaus Wirth at the University of Zurich, Switzerland. It was considered as an extension of ALGOL 60. Pascal was born as a structured language with built-in data types and structures like arrays, strings, records, subranges, sets etc. Then there were two versions of Pascal – the first version called "Pascal 68K" and the other being "Pascal 7×7". In 1972, Pascal was made available for commercial use. In 1973 a working group was formed that produced a standard definition of pascal. This work resulted in a document that was named as "ANSI/ISO Pascal" which is still used today.

In 1968 the C programming language was being designed by Dennis Ritchie at Bell Labs. The first version of this programming language came out in 1972. In 1973, the Unix operating system was being created and it needed a new compiler so Dennis Ritchie rewrote the C compiler from scratch to support Unix during this process. He added a number of features to C like structure pointer operators, arrays as function arguments, dynamic memory allocation and a preprocessor to help manage large projects. These features made C a powerful programming language that has been widely adopted by many programmers over the years.

In 1991, C++ was released as an extension of C programming language. It included classes which allow users to define their own data type and methods to operate on them as well as allowing them to reuse code from other classes or modules. It also included a standard library for common tasks like input/output operations, string manipulation and mathematics.

In 1993 Java was released as an extension to C and C++, created to run on any platform that can support it. Java is used for small and large programs. To create a program in Java the user needs to write code in a special class called "program". This code is then compiled into byte codes which are interpreted by the Java Virtual Machine (JVM). The JVM can run on any hardware or software platform since it is platform independent. Java also allows users to use its class libraries such as Java AWT (Abstract Window Toolkit) to create windows and buttons, Java Swing for creating complex user interfaces and much more.

II: Body

A: Understanding the JavaScript

JavaScript is a programming language that is used primarily to enhance web pages but can also be used for other purposes like creating desktop applications and much more. It was created by Brendan Eich in 1995 and has been standardized by Ecma International as ECMA-262 specification. It has become popular due to its easy syntax and its ability to run on all platforms which support JAVA Virtual Machine (JVM). JavaScript can also be executed inside Java applets as well as within web browsers like Mozilla Firefox, Internet Explorer and Google Chrome. It is used on websites like Facebook, Twitter, Google Maps etc.

Like other programming languages JavaScript uses variables, operators, conditionals etc. Variables are named memory locations that have values assigned to them. Operators are symbols or words that are used to perform an action on one or more variables or literals. Conditionals are used for making decisions based on certain conditions. Let us look at some examples of these constructs using [removed]

Example 1: Declaring variables using JavaScript

var name = "John"; var age = 15; var salary = 50000; var height = 175; var gender = "Male"; var favoritePlanet = "Earth";

Example 2: Using operators in JavaScript

var x = 50 * 100; var y = 25 / 3 + 12; var z = 5 - 2;

Example 3: Using conditionals in JavaScript

if (age >= 35) { alert("You are eligible for a senior citizen discount."); } else { alert("You are not old enough."); } if (gender == "Male") { alert("Welcome to our men's section."); } else { alert("You are in the wrong section."); } if (1 + 1 == 2) { alert("The answer is correct."); } else { alert("The answer is incorrect."); } if ("JavaScript" == "Java") { alert("Your answer is correct."); } else { alert("Your answer is incorrect."); } if ((height > 180) && (height < 190> 190) && (height < 200)) { alert("You are average height."); } else { alert("You are short."); } if (favoritePlanet == "Earth") { alert("You are an Earthling."); } else { alert("You are not an Earthling."); }

III: Conclusion

There you go! That was easy! You now know how to create an outline for an article about Programming Languages! Just follow these steps for each section of your article:

loader
Course content