What can be done with javascript

JavaScript Overview

Control the appearance of elements on your web page

Every web page is a collection of several individual elements which are called objects like an image, a link etc.

JavaScript is capable of controlling the appearance of many objects. For example, you can open new pages in customized windows where you can specify their size, determine whether they have scroll bars or not etc.

JavaScript responds user actions on your web pages

JavaScript can control objects on web pages in response to various actions taken by the user which is called event. For example display a dialog box when a user clicks on a button, opening a new page, mouse over on a link to change the appearance of the link or control the background color of your web pages.

Display various date time format

JavaScript has the ability to retrieve the date and time of your computer’s clock and it is enabled to display various formatting of date-time through its internal date object.

Perform calculations

JavaScript can perform a wide variety of mathematical calculations. It has a library of all the mathematical constants and functions needed. These functions can be applied in different ways, for example, an online financial transaction where JavaScript can be used to calculate subtotal, total etc, or an online calculator or creating games and interactive simulations with the advance math functions such as sine and cosine.

Читайте также:  Ним2 пасьянс python задача

Validate forms data

JavaScript can be used to validate form data including names, addresses, URL, email addresses, phone numbers, zip codes etc. in html forms before sending the data to a server. If you want to validate the said data in server side you have to wait while the information is sent up to the server for checking, using JavaScript you can detect the error and prompt the user immediately.

Create Cookies

A cookie is a mechanism in a web browser where a simple text sent to the visitors’ computer. As it is a piece of text, cookies are not executable. JavaScript can store information from this piece of text on visitor’s computer and reuse it automatically next time the user visits the same page.

Detect the visitor’s browser

Sometimes it is difficult to create pages that are displayed identically on different browsers or even operating systems. JavaScript can detect the visitor’s browser and load the appropriate page for that specific browser.

Dynamic HTML

Dynamic HTML, or DHTML, is a collection of technologies used together to make interactive and animated website by using a combination of JavaScript, HTML, DOM (Document object module) and CSS

Test your Programming skills with w3resource’s quiz.

Follow us on Facebook and Twitter for latest update.

Источник

What Can I Do With JavaScript

JavaScript can do many incredible things. You can use JavaScript to build:

Websites

You can build a website with HTML and CSS alone. But if you want your website to do more things than just displaying information, you will need to use JavaScript.

In JavaScript, you can make your website to be more interactive, meaning users who visit your websites can see and do all sorts of things such as:

  • Add animations to the web page.
  • Open the drop-down menu on mobile screens.
  • Play video and audio on a web page
  • Create and submit an input form.
  • Create, update, and remove the user posts.
  • Create a user account
  • Send and request the data to the servers and databases.
  • And much, much more!

Mobile applications

In the past, programmers develop a mobile application using a programming language for a specific platform. For example, Java is used to build Android applications, and Swift is used for building iOS applications.

Today, you can also build mobile applications in JavaScript with the help of a tool called React Native. React Native is a mobile application framework used to create mobile applications for both Android and iOS. With React Native, you can write the code once and run it on both platforms.

Some examples are Facebook, Instagram, Uber Eats, Discord, Pinterest, and Skype. These mobile applications are built using React Native, and it behaves exactly like native ones.

Desktop applications

Nowadays, it is possible to build desktop applications in JavaScript through a tool called Electron. Electron is a free and open-source tool that lets programmers build desktop an application using web development tools.

In other words, If you know HTML, CSS, and JavaScript, you can use Electron to build desktop apps as if it is a website!

Well-known examples of desktop applications built with Electron are Visual Studio Code, Facebook Messanger, Twitch, and Microsoft Teams.

Why it’s worth learning JavaScript?

The reason, why it’s worth learning JavaScript is due to three main reasons:

  1. It is relatively straightforward to learn when compared to other programming languages.
  2. JavaScript is so versatile that it can build websites, mobile applications, and desktop applications.
  3. There is a strong demand for JavaScript programming language in the software engineering industry.

Because of these reasons, picking up JavaScript as a first programming language to learn is a solid choice. If this sounds exciting to you or at least makes you curious enough to try out the programming language, sign up today up and start to learn JavaScript!

Источник

Оцените статью