Javascript is an interpreted programming language with object-oriented capabilities. It is a client-side scripting language that is object- and time-driven and relatively secure. Because it does not need to run in a language environment, it only needs a browser that supports it. Its main purpose is to verify the data sent to the server, increase web interaction, and enhance user experience.
The difference between interpreted language and compiled language
Interpreted language: This is the program that is compiled during operation Compiled into machine language.
Compiled language : This type of language has a compilation process when running the program, but the program is not compiled into machine language, but into bytecode. For example, when the Java language is running, the JVM translates the bytecode into machine language. JVM is a java virtual machine, which is a fictitious computer.
But the efficiency of compilation of interpreted languages is slower than that of compiled languages. JavaScript is an interpreted language. When it parses the program on the browser, js uses its own interpretation engine on the browser. javascript v8 engine. When the browser core compiles js into a view, it needs to go through three stages: "lexical analysis", "grammatical analysis" and "code generation". This is an obvious characteristic of compiled languages. For details, see Chapter 2 of "Rhinoceros Book" and "JavaScript You Don't Know" Chapter 1.
java code is executed by JVM
javascript is executed by javascript interpreter
Each Browsers are different and are generally included in the kernel of each browser.
The browser kernel generally contains two engines: Page layout engine and JS engine
IE uses its own Trident kernel
FireFox is the Gecko kernel
Opera is the Presto kernel
Safari uses the Webkit kernel
Chrome is Google’s own javascript V8 engine and its page layout uses the Webkit kernel
JavaScript is a scripting language, and scripting language is also an interpreted language. Scripting language does not need to be compiled, it is directly interpreted Just use the tool to explain. Judging from the argument that JavaScript is a compiled language just now, JavaScript is also a compiled language. It cannot be generalized as a scripting language. The way to understand scripting languages is simple.
Write a program called xxx.exe. Click .exe to open a file with the extension .aa. Then you have specified rules for writing .aa files. This is what the script does and its relationship. Use instructions to let the program execute in order.
Understanding the relationship and principles of javascript in the browser kernel
Principles of browser parsing and rendering pages:
Talking about this I must mention the familiar webkit, the rendering engine of Google Chrome. The rendering engines in other browsers are not the same, and the core engines of each browser are inconsistent, so now we have to deal with a lot of compatibility issues with major browsers in the process of writing HTML code to layout the page structure. .
The most important and core part of the browser is the interpretation engine, which is the browser kernel. A web page needs to use two engines to work properly: a rendering engine and an interpretation engine. Various ways of writing compatibility are targeted at these browser kernel engines. So what are the current mainstream browser cores?
# The four mainstream browsers on the market
# ie
The browser kernel used by Trident (four The processing speed is the slowest among large cores)
Due to the share of the window market, IE browser has used its position to create a situation where the Trident kernel is the only one. Because of this situation, Microsoft has not dealt with it for a long time. Trident has been updated. Trident has been out of touch with W3C standards and has a large number of bugs and security issues that cannot be solved, which directly led to the rise of the FireFox browser. However, due to its market share, the most troublesome compatibility issue for front-end development engineers now is for some lower versions of IE.
FireFox
The browser kernel used is Gecko
Open source code, fast operation and processing speed. Open source things are always easy to be welcomed by the majority of apes! And there are many browsers that use Gecko, usually used in some foreign browsers. Don’t think too much about it domestically!
Opera
## This browser kernel is Presto The most fierce brutal interpretation engine! Web page layout engine. It has been highly optimized to increase the rendering speed. To put it simply, it is all about efficiency and speed. But there are gains and losses, and speed is gained at the expense of compatibility. Needless to say, it is the fastest parsing javascript among all browser cores. But now, because the front-end is developing so fast, user experience is the priority in everything, and compatibility cannot be sacrificed for speed. Opera stopped presto and switched to Google's Blink kernel.Chrome
The browser kernel used is webkit rendering engine javascript v8 interpretation engine Everything that should be said has been explained above. No further explanation here. This is also the core of the Chrome browser, a browser that many people have begun to learn about front-end and front-end engineers prefer. It is Apple's own core.# Shell browser :
Use IE kernel instead of IE browser. This kind of browser is called "shell browser". The reason for this is that Trident is an open kernel, so a large number of such shell browsers have appeared in the domestic market. For example, 360, Tencent TT, Cheetah, and Aoyou use dual-core or even multi-core methods. One of them is a Trident core, and other cores are added to the others. Domestic browser manufacturers generally divide this situation into two types, "high-speed browsing mode" and "compatible browsing mode" for users to switch back and forth. Among them, IE kernel Trident is "compatible browsing mode" because domestic manufacturers The applied IE kernel version is not very high and cannot keep up with Trident's iterative update speed. The lower version of the IE kernel is too small and convenient for users to download. Therefore, it has been widely bundled, installed and used since the beginning of development. Until now, there will be certain security problems. As rated by many issues above, solve and cognition step by step. We know what an interpreted language is and what a compiled language is. I got to know the browser kernel through interpreted languages. Some of the differences between them are closely related to the process of writing code. In the process of learning the web front-end or in the process of constantly improving yourself, understanding and knowing JavaScript must be the most important. In the development process of JavaScript, perhaps many friends thought before that it was necessary to study JavaScript with concentration? From now on, if someone consults you and wants to learn a language or master a new language, you need to recommend JavaScript to him. It must be JavaScript. From the emergence of jQuery, which first drove the development of javascript, to html5, which made javascript truly accessible to people, and now to nodejs. It completely subverts most people's previous views on JavaScript. The emergence of these new frameworks gives JavaScript true unlimited potential!HTML5 is the advanced content of JavaScript. But some optimizations have been done and some new tags have been added. The new tags are not difficult to understand and easy to use. Why are they defined as the basic part of html? The real power of HTML5 is that you can create tags through JavaScript and use the two characteristics of the kernel to interpret and render respectively. Canvas is also well-known because of its powerful functions, including animation, special effects, games, and data. visualization. All require javascript and background support to have their effect. All thanks to javascript. webgl supports HTML5 canvas drawing 3D image effects. The geographical location expenditure of html5 is displayed in the browser through LBS applications and so on. The connection between javascript and document database has achieved too many impossibilities. The ECMAscript version is constantly iteratively updated, and there are too many js frameworks based on it, such as vuejs, angularjs, reactjs...
The above is the detailed content of From basics to proficiency-javascript language. For more information, please follow other related articles on the PHP Chinese website!

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.

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 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.

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

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.

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.

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.

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


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SublimeText3 Mac version
God-level code editing software (SublimeText3)

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
