JavaScript

황희윤·2021년 8월 25일
2

What is JavaScript and how do we use it?

JavaScript is a programming language that is mainly used for web development. JavaScript is the most popular programming language used by professional developers, especially front-end developers.
Even back-end developers choose JavaScript more often than not.

It allows you to implement complex and dynamic features on web pages that cannot be done with only HTML and CSS. If you make your web page only using HTML and CSS, your web page would be static, and you’d only have the dynamic changes like animations that CSS provides.
Javascript can change HTML content or CSS style. It makes the web page more user-friendly so that interact and respond to users’ actions.

For example, you can make a click-to-show dropdown menu on your website, extra content added to a page, or dynamically changing element colors on a page, to name a few features.
You can also show or hide more information with the click of a button, display a timer or count-down and play video and audio on a web page.

Beyond making websites, developers can also use JavaScript to build simple web servers and develop the back-end infrastructure using Node.js.

Node is a server-side platform built on Chrome’s JavaScript Engine. It’s written in JavaScript and provides a rich library of various JavaScript modules which simplifies the development of web applications.

JavaScript can affect Big Data and the Cloud system. JavaScript Object Notation (JSON) is the go-to standard for data exchanges on today’s internet.

JSON documents are used for record storage and although JSON plays well with any programming language, it does best with JavaScript.
Also, many developers are turning to Node.js to build cloud-based apps.

Javascript can be used to make games because it can easily create visual effects make it a perfect fit for game developers.

Features of Javascript

1. Scripting Language

The script is originated from ‘script’ used for a theater play. In theater, actors play actions based on their script. Like actors, computers read scripts and work.

JavaScript is a lightweight scripting language because it is made for data handling at the browser.

2. Dynamic Typing

JavaScript supports dynamic typing which means types of the variable are defined based on the value.

For example, if you declare a variable x then you can store either a string or a number type value or an array or an object. This is known as dynamic typing.

In JavaScript, we just have to use var or let keywords before the variable name to declare a variable without worrying about its type.

However, because the computer has to find what the type of value is, so it takes more time to get the result by using Javascript than using other programming languages like Java and C programming.

3. Object-Oriented Programming Support

An Object is a unique entity that contains property and methods.

For example “car” is a real-life object, which has some characteristics like color, type, model, horsepower and performs certain actions like drive. The characteristics of an Object are called Property, in Object-Oriented Programming(OOP) and the actions are called methods.

An Object is an instance of a class. Objects are everywhere in JavaScript almost every element is an Object whether it is a function, array, and string.

4. Platform Independent

This implies that JavaScript is platform-independent or we can say it is portable; which simply means that you can simply write the script once and run it anywhere and anytime. In general, you can write your JavaScript applications and run them on any platform or any browser without affecting the output of the Script.

5. Prototype-based Language

JavaScript is a prototype-based scripting language. This means javascript uses prototypes instead of classes or inheritance. In languages like Java, we create a class and then we create objects for those classes.
But in JavaScript, we define object prototype and then more objects can be created using this object prototype.

6. Interpreted Language

JavaScript is an interpreted language which means the script written inside javascript is processed line by line.
These Scripts are interpreted by a JavaScript interpreter which is a built-in component of the Web browser.

profile
HeeYun's programming study

0개의 댓글