Getting Started with JavaScript

The JavaScript language, originally called Mocha and then LiveScript, was introduced in 1995 by Brendan Eich, who designed it for a now-outdated browser called Netscape Navigator.


The language is used to add dynamic web behavior to a web page or the components of a web page, or to provide more interactivity on a webpage – such as sorting and filtering table data.


To get a better understanding of JavaScript, let’s explore its placement among two other web design languages: HTML and CSS.


The Relationship among HTML, CSS, and JavaScript

In HTML, you use HTML elements to specify the structure of a web page and the meaning of individual components on a web page. For example, HTML elements describe which area on the web page is the main content and which area is used for navigation, and they define components such as forms, lists, buttons, input fields, or tables.


For CSS, special CSS rules are used to determine how the individual components that you have previously defined in HTML should be displayed; this is, CSS is used to define the design and layout of a web page. For example –text color, text size, borders, background colors, color gradients, etc.


As mentioned previously, JavaScript is used to add dynamic behavior to the web page (or to the components on a web page). So, while CSS takes care of the design of a web page, JavaScript can be used to improve the user experience and interactivity of a web page. Clickable buttons and tabs on a page, sorting and filtering functions, and form input validation can all be coded with JavaScript.


In most cases, a web page consists of a combination of HTML, CSS, and JavaScript code. Even though JavaScript takes care of the behavior of a web page, you can still create functional web pages without JavaScript. You can also create web pages without CSS, but in this scenario, only the HTML is evaluated by the browser. That means, however, that the web page is less fancy (when missing CSS) and less interactive and user-friendly (when missing JavaScript).


When approaching the development of a website, there are a few questions you can consider: What are the different areas of the web page? What are the headings? Is there any data presented in tabular form? What are the navigation options? Which information is included in the footer area and in the header area of the page? These considerations are only applicable to HTML. The website won’t look nice or be very interactive, since this is just the beginning stage of development and you don’t want to be distracted from the website content. Later, you can focus on implementing the design using CSS and the behavior of the web page using JavaScript.


About the JavaScript: The Comprehensive Guide book

Where are you in your JavaScript journey? You may be a beginner looking for some guidance on getting started, or an advanced programmer in need of a comprehensive resource to reference. To help audiences across all levels, we’ve published JavaScript: The Comprehensive Guide to support your growing knowledge.


First, you’ll be introduced to programming basics and how JavaScript has evolved over time. The book provides insight on what JavaScript is used for and its placement among HTML and CSS, along with an overview of the JavaScript language core.


Understand how to work with reference types, dynamically change web pages, and process and trigger events. Then, see how JavaScript increases the interactivity of forms. The next chapter discusses browsers and how they are used to access relevant information.


Asynchronous JavaScript and XML is used for modern web application development, and readers will learn how to use this technology to dynamically update individual parts of a web page with content from the server rather than completely reloading the page. You’ll learn how JavaScript is also beneficial for simplifying tasks with jQuery.


Explore two different technologies for creating images and graphics dynamically, and get familiarized with a handful of APIs that will make your web applications more dynamic and versatile. Next, understand the core concepts of object-oriented and functional programming, then understand how to structure JavaScript source code.


The book goes more in depth about asynchronous programming, along with other advanced features for development. You’ll get to know Node.js, it’s placement with JavaScript, and how to use it to create server-based applications. Also, you’ll find details on creating desktop applications and microcontrollers.


Close out your learning journey with insight on how to establish a professional development process with JavaScript.


Who Is This Book For?

This book is beneficial for learners on both ends of the JavaScript knowledge spectrum. Readers with no programming experience in JavaScript, or any language, will learn essential background knowledge and concepts, while more advanced programmers can use this guide to deepen their experience and have a resource at hand to reference.


About the Author

Philip Ackermann is CTO of Cedalo GmbH and author of several reference books and technical articles on Java, JavaScript, and web development. His focus is on the design and development of Node.js projects in the areas of Industry 4.0 and Internet of Things.


How to Purchase

If you’re interested in purchasing JavaScript: The Comprehensive Guide, follow this link and choose the format that works best for you: e-book, print edition, or bundle (both e-book and print).


If you want to continue learning about JavaScript, or if you want information on other upcoming books or special offers, make sure to sign up for our topic newsletters or our weekly blog recap.


 JavaScript: The Comprehensive Guide
JavaScript: The Comprehensive Guide

Begin your JavaScript journey with this comprehensive, hands-on guide. You’ll learn everything there is to know about professional JavaScript programming, from core language concepts to essential client-side tasks. Build dynamic web applications with step-by-step instructions and expand your knowledge by exploring server-side development and mobile development. Work with advanced language features, write clean and efficient code, and much more!

Learn More
Rheinwerk Computing
by Rheinwerk Computing

Rheinwerk Computing is an imprint of Rheinwerk Publishing and publishes books by leading experts in the fields of programming, administration, security, analytics, and more.