JavaScript Basics - Exercise 2

HTML provides the structure and content of a web page, including headings, links, and other elements. CSS controls the visual presentation, including fonts, colors, and spacing.

JavaScript adds interactivity, enabling features such as image sliders and form validation. Together, these technologies help developers create dynamic and engaging websites Read more.

JavaScript is a versatile programming language that can be used in a variety of different contexts. Some of the main areas where JavaScript is used include:

  • JavaScript in web development: Crucial for dynamic interfaces and form validation.
  • Server-side programming: Node.js enables backend tasks like API building.
  • Cross-platform app development: JavaScript frameworks like React Native support mobile and desktop apps.

Brendan Eich created JavaScript at Netscape in the mid-1990s. It was initially called Mocha and then LiveScript before being renamed JavaScript in 1995. The language was designed to make web pages interactive without requiring a page refresh.

JavaScript was introduced in Netscape Navigator 2.0 and quickly gained popularity. It was later standardized as ECMAScript by ECMA and has continued to evolve with new features. Today, JavaScript is used in web, server-side, mobile, and desktop applications through technologies such as Node.js and React Native Read more .

JavaScript was created by Brendan Eich at Netscape in 1995, originally under the name Mocha and later LiveScript. It was designed to add interactive behavior to web pages and was standardized as ECMAScript soon afterward.

ECMAScript, a standardized version of JavaScript overseen by the European Computer Manufacturers Association (ECMA), was first released in 1997. It serves as a specification for JavaScript, defining syntax, data types, and other language elements to ensure consistent execution across different platforms.

  • ES5 (2009): This version introduced several new features such as JSON support, strict mode, and improved support for working with arrays and objects.
  • ES6 (2015) : This version introduced several new features such as arrow functions, template literals, and let and const keywords. It also introduced new data types such as Map, Set and Symbol.

JavaScript can be used both in the front-end and back-end of web development.

Front-end:In front-end development, JavaScript is primarily used to create interactive user interfaces and dynamic web pages. This is done by adding JavaScript code to an HTML document and using it to manipulate the Document Object Model (DOM) of the page.

Back-end: JavaScript can also be used for server-side programming, thanks to technologies such as Node.js. Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine that allows developers to run JavaScript code on a server. Node.js provides an environment for JavaScript to run on a server, which enables developers to use JavaScript for back-end development.

A web browser is a software application enabling users to access and view web pages, interpreting HTML, CSS, and JavaScript code to render content. Examples include Google Chrome, Mozilla Firefox, and Safari.

A website is a collection of web pages hosted on a server and accessed via a web browser. These pages, containing text, images, videos, and interactive elements, serve various purposes like providing information or facilitating commerce.

A web page is a document written in a markup language like HTML , accessed and displayed by a web browser. It contains text, images, videos, and interactive elements. Typically organized into websites, web pages are linked together and can include a home page and other pages like about or product pages.