search
HomeWeb Front-endJS TutorialAn explanation of JavaScript itself

An explanation of JavaScript itself

Jul 24, 2017 pm 02:24 PM
javascriptjswhat is

JavaScript is an interpreted language rather than a compiled language. It is often considered a scripting language rather than a real programming language. That is, scripting languages ​​are simpler, they are programming languages ​​used by non-programmers.

If a programmer does not have a solid understanding of JavaScript, he will find the whole process difficult when he wants to use JavaScript to perform more complex tasks.

According to the ECMA-262 standard, the official name of the JavaScript language is ECMAScript. However, this unwieldy name is only officially used when the standard is explicitly referenced. Technically, the name "JavaScript" refers only to the implementation of the language from Netscape and the Mozilla Foundation. In fact, everyone calls this language JavaScript.

Client-side JavaScript combines the scripting capabilities of the JavaScript interpreter with the Document Object Model (Dom) defined by the web browser.

JavaScript can not only control the content of HTML documents, but also the behavior of these documents.

JavaScript is a general-purpose programming language, and its uses are not limited to web browsers. JavaScript is designed to be embedded into any other application and provide scripting capabilities to the application.

If you need to truly learn a new programming language, you must use it to write programs.

For simple JavaScript experiments, it is sometimes possible to use the JavaScript:URL pseudo-protocol to evaluate a JavaScript expression and return the evaluation result. A JavaScript URL is composed of JavaScript: protocol specifier plus arbitrary JavaScript code (separated by semicolons between statements). When a browser loads such a URL, it will execute the JavaScript code contained within it. The value of the last expression in such a URL will be converted into characters, and the string will be displayed in the web browser as a new document.

The lexical structure of a programming language is a set of basic rules that detail how to write programs in the language. It is the lowest level syntax of a language, specifying rules such as what variable names should look like, what characters should be used for comments, and how statements should be separated.

JavaScript programs are written using the Unicode character set. The 16-bit Unicode encoding can represent every written language commonly spoken on earth. This is an important feature of internationalization, especially for programmers who do not speak English.

JavaScript is a case-sensitive language.

These tag and attribute names can be entered in any case in HTML, but in JavaScript they are usually lowercase.

Direct quantity is the data value directly displayed in the program.

Identifier is a name, which is used to name variables and functions, or used as a label for certain loops in JavaScript code. The first character must be a letter, underscore, or dollar sign. An identifier cannot have the same name as a keyword used for other purposes in JavaScript.

Reserved words, break, do, if, switch, typeof, case, else, in, this, var, catch, false, instanceof, throw, void, continue, finally, new, true, while, default , for, null, try, with, delete, function, return.

In a programming language, the type of value that can be represented and manipulated is called a data type, and one of the most basic features of a programming language is the set of data types it supports. JavaScript allows the use of 3 basic data types - numbers, text strings and Boolean values. There are also two small data types, null (empty) and undefined (undefined), each of which defines a value.

JavaScript also supports consistent data types - objects. There are two types of objects in JavaScript. One object represents an unordered collection of named values, and the other represents an ordered collection of numbered values. The latter is called an array.

Special object——Function. A function is an object with executable code that can be used as a calling function to perform some action. Functions behave differently from other types of objects.

The difference between Javascript and other programming languages ​​​​is that it does not distinguish between integer values ​​and floating point values. All numbers in JavaScript are represented by floating point types. JavaScript number format allows exact representation of all integers between -9007199254740992 (-2^53) and 9007199254740992 (2^53), but using integers beyond this range, you lose mantissa precision.

Escape sequence, in JavaScript strings, the backslash (\) has a special purpose. Adding a character after the backslash symbol can represent characters that cannot appear in the string.

The above is the detailed content of An explanation of JavaScript itself. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Python vs. JavaScript: A Comparative Analysis for DevelopersPython vs. JavaScript: A Comparative Analysis for DevelopersMay 09, 2025 am 12:22 AM

The main difference between Python and JavaScript is the type system and application scenarios. 1. Python uses dynamic types, suitable for scientific computing and data analysis. 2. JavaScript adopts weak types and is widely used in front-end and full-stack development. The two have their own advantages in asynchronous programming and performance optimization, and should be decided according to project requirements when choosing.

Python vs. JavaScript: Choosing the Right Tool for the JobPython vs. JavaScript: Choosing the Right Tool for the JobMay 08, 2025 am 12:10 AM

Whether to choose Python or JavaScript depends on the project type: 1) Choose Python for data science and automation tasks; 2) Choose JavaScript for front-end and full-stack development. Python is favored for its powerful library in data processing and automation, while JavaScript is indispensable for its advantages in web interaction and full-stack development.

Python and JavaScript: Understanding the Strengths of EachPython and JavaScript: Understanding the Strengths of EachMay 06, 2025 am 12:15 AM

Python and JavaScript each have their own advantages, and the choice depends on project needs and personal preferences. 1. Python is easy to learn, with concise syntax, suitable for data science and back-end development, but has a slow execution speed. 2. JavaScript is everywhere in front-end development and has strong asynchronous programming capabilities. Node.js makes it suitable for full-stack development, but the syntax may be complex and error-prone.

JavaScript's Core: Is It Built on C or C  ?JavaScript's Core: Is It Built on C or C ?May 05, 2025 am 12:07 AM

JavaScriptisnotbuiltonCorC ;it'saninterpretedlanguagethatrunsonenginesoftenwritteninC .1)JavaScriptwasdesignedasalightweight,interpretedlanguageforwebbrowsers.2)EnginesevolvedfromsimpleinterpreterstoJITcompilers,typicallyinC ,improvingperformance.

JavaScript Applications: From Front-End to Back-EndJavaScript Applications: From Front-End to Back-EndMay 04, 2025 am 12:12 AM

JavaScript can be used for front-end and back-end development. The front-end enhances the user experience through DOM operations, and the back-end handles server tasks through Node.js. 1. Front-end example: Change the content of the web page text. 2. Backend example: Create a Node.js server.

Python vs. JavaScript: Which Language Should You Learn?Python vs. JavaScript: Which Language Should You Learn?May 03, 2025 am 12:10 AM

Choosing Python or JavaScript should be based on career development, learning curve and ecosystem: 1) Career development: Python is suitable for data science and back-end development, while JavaScript is suitable for front-end and full-stack development. 2) Learning curve: Python syntax is concise and suitable for beginners; JavaScript syntax is flexible. 3) Ecosystem: Python has rich scientific computing libraries, and JavaScript has a powerful front-end framework.

JavaScript Frameworks: Powering Modern Web DevelopmentJavaScript Frameworks: Powering Modern Web DevelopmentMay 02, 2025 am 12:04 AM

The power of the JavaScript framework lies in simplifying development, improving user experience and application performance. When choosing a framework, consider: 1. Project size and complexity, 2. Team experience, 3. Ecosystem and community support.

The Relationship Between JavaScript, C  , and BrowsersThe Relationship Between JavaScript, C , and BrowsersMay 01, 2025 am 12:06 AM

Introduction I know you may find it strange, what exactly does JavaScript, C and browser have to do? They seem to be unrelated, but in fact, they play a very important role in modern web development. Today we will discuss the close connection between these three. Through this article, you will learn how JavaScript runs in the browser, the role of C in the browser engine, and how they work together to drive rendering and interaction of web pages. We all know the relationship between JavaScript and browser. JavaScript is the core language of front-end development. It runs directly in the browser, making web pages vivid and interesting. Have you ever wondered why JavaScr

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.