速報APP / 教育 / JavaScript Tutorials offline with Exampl

JavaScript Tutorials offline with Exampl

價格:免費

更新日期:2019-04-30

檔案大小:2.8M

目前版本:1.0.0

版本需求:Android 4.0 以上版本

官方網站:http://fvwebsolutions.com

Email:fvwebsolutions@gmail.com

聯絡地址:Surat

JavaScript Tutorials offline with Examples(圖1)-速報App

JavaScript is one of the most important programming languages today. Now learn JavaScript on your own at your home and that too without internet. The app is designed to teach you JavaScript in the simplest way, with well explained examples for better understanding. You also get examples with editor mode so that you can edit code as per your requirement and see the output instantly.

Introduction to JavaScript

What is JavaScript?

JavaScript is a scripting language which is a lightweight programming language.

JavaScript is usually embedded directly into HTML pages to increase interactivity with them.

JavaScript is an interpreted language (which means that the scripts execute without preliminary compilation).

b. What can JavaScript do?

JavaScript gives HTML designers a programming tool: HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax.

JavaScript can put dynamic text into an HTML page.

JavaScript can react to events: A JavaScript can be set when something happens, like when a page has finished loading or when the user clicks on a HTML element.

JavaScript can read and write HTML elements.

JavaScript can be used to validate data: It could be used to validate form data before it is submitted to a server.

JavaScript Tutorials offline with Examples(圖2)-速報App

JavaScript can be used to detect the visitor’s browser: it can detect the browser and depending on that it could load another page.

JavaScript can be used to create cookies i.e. it can store and retrieve data on visitor’s computer.

c. How to use JavaScript?

JavaScript must be added between the tags.

There are three ways to add javascript to a HTML page:

In the head tag( ).

In the body tag(

).

Externally.

Also more than one ways can be used to add JavaScript to the same HTML page.

Syntax basics

JS Comments

JavaScript Tutorials offline with Examples(圖3)-速報App

Like any other language even JavaScript has comment syntax which are generally used in the following two situations:

To prevent execution when testing alternative codes.

To explain JavaScript code, for better understanding.

There are two types of JS comment syntax:

For single lines ? ( // Hi, this is a comment. )

For multiple lines ? ( /* Anything between in here is a comment. */ )

d. JS Datatypes

JavaScript variable can hold many datatypes such as:

NUMBERS: a JS variable can store any number assigned to it by the programmer or the user.

STRING: a string is a series of characters. Unlike numbers it is always written within quotes.

OBJECT: JS objects are written within curly brackets. check out the example to know how to store the objects in a JS variable.

ARRAYS: these are used to store more than one values in a single JS variable. It is written within square brackets and different values are separated by commas.

JavaScript Tutorials offline with Examples(圖4)-速報App

BOOLEANS: this datatype only store two values in a variable i.e “true” or “false”. And although it can be confused with string but it is written without quotes.

4. JS Comparisons

Comparison Operators are often used to check whether a given conditions is satisfied or not and hence move forward with the programme depending on the results. Following are the operators commonly used for comparisons:

JavaScript Tutorials offline with Examples(圖5)-速報App