What is Javascript?

Yoseob Shin·2022년 3월 25일
0

javascript

목록 보기
3/24
post-thumbnail
post-custom-banner

What is JavaScript?

What is JavaScript? JavaScript is primarily a client-side language. JavaScript started at Netscape, a web browser developed in the 1990s. A webpage can contain embedded JavaScript, which executes when a user visits the page. The language was created to allow web developers to embed executable code on their webpages, so that they could make their webpages interactive, or perform simple tasks. Today, browser scripting remains the main use-case of JavaScript.

JavaScript’s syntax is heavily inspired by C++ and Java. If you have experience in C++ or Java, JavaScript’s syntax will seem familiar to you. However, the inner workings of JavaScript is closer to a dynamically-typed, interpreted language such as Python or Ruby.

JavaScript is an interpreted language, not a compiled language.

A program such as C++ or Java needs to be compiled before it is run. The source code is passed through a program called a compiler, which translates it into bytecode that the machine understands and can execute. In contrast, JavaScript has no compilation step. Instead, an interpreter in the browser reads over the JavaScript code, interprets each line, and runs it. More modern browsers use a technology known as Just-In-Time (JIT) compilation, which compiles JavaScript to executable bytecode just as it is about to run.

JavaScript is named after Java, and many ideas are borrowed from the Java language. Other than that, Java and JavaScript are two entirely distinct languages.

The most significant difference between them is that Java is a compiled language, and JavaScript is a interpreted language.

JavaScript runs on many browsers out-of-the-box, whereas Java applets require an additional plug in. Both languages have different runtime environments, different governing bodies, different libraries.

Despite all its faults, JavaScript is a very useful language. JavaScript runs in every web browser, out of the box. A JavaScript application runs on every device, whereas a desktop or mobile application runs only on the application it is targeted to (Windows, Mac OSX, Linux, iPhone, Android). This allows you to write cross-platform apps in a really easy way. JavaScript’s role has also expanded significantly. Platforms such as Node.js allow developers to run JavaScript server-side. It is now possible to create entire web applications in which both client-side and server-side logic is written in JavaScript.

JavaScript can be a very complicated language, and most teams use only a subset of JavaScript. If you read a style guide, it will recommend the use of particular JavaScript techniques, constructs and libraries. Since JavaScript is so messy, this class will make a number of recommendations on what we consider good style. However, we will cover a wide range of styles so that you can jump into a new team and pick up the style quickly.

The above text was taken from Standford university article(https://web.stanford.edu/class/cs98si/slides/overview.html#:~:text=The%20source%20code%20is%20passed,each%20line%2C%20and%20runs%20it.)

profile
coder for web development + noodler at programming synthesizers for sound design as hobbyist.
post-custom-banner

0개의 댓글