Javascript
The Ultimate guide for javascript programming (javascript for beginners, how to program, software development, basic javascript, browsers)
STANLEY HOFFMAN
CONTENTS
I think next books will also be interesting for you.
C++
Python
Computer Hacking
Hacking for Dummies
Introduction
Computers, in this generation, seems to be no longer intimidating. They are now becoming one of our everyday tools allowing us to make things easier and efficient. Although the latest computer operations today are user-friendly, there are still a lot of hidden complexities. Most people will find them difficult to understand. Hence, this book was written for those who want to discover the maximum potentials of computers in the simplest way possible.
In order to do that, you have to keep in mind that communication is a vital part of computer processes. This is not a process between computers but rather between the user behind the keyboard and the operating machine. The basic element, of course, is language. Learning a language like C will allow you to command the machine in the way you want and how you want it to be.
In this book, you will learn one of the most important languages of computers the JavaScript.
Programming in a Nutshell
Before moving on to JavaScript, it is vital to understand what is programming first.
A computer program can be anything. The software youre using to read this eBook is a program. The internet browser you use is a program. The application which plays your music files is a program. The game you are playing is a program. In other words, everything you see and you use in your computer is a program. All these were products of a single process known as programming.
Programming is an art. It is where programmers type a piece of text that commands the computer to perform specific operations.Let us take the human body as an analogy.
If you are given a mathematical problem to solve, your brain has to process it. Depending on the scale of the equation, you might find yourself counting your fingers or solving a formula on a sheet of paper. In short, there are several bodily functions at work.
In programmings perspective, all these body functions are programs and your whole body is the machine. The mechanical counterpart of your brain is the machines memory. The equation is the data we want to process.
Our primary goal here is to process the data. In the scenario above, that is to have the correct answer for the mathematical problem. For our body to be able to do that, your eyes need to see the problem and relay that to your brain. For a machine, you need a program to relay that signal to the computers memory.
Going back to the human body, you may need to use your fingers or a sheet of paper to solve the equation. To control your fingers, your brain has to send signals for them to operate in a manner that will help you solve the problem at hand. For a machine, you need a separate program to do that.
In other words, a machine and its parts are the irrational versions of a human body and its parts. It is only that a machine can process everything in a split of a second.And to link these parts into the computers memory, you need to assert thousands of programs. Hence, programming is the art where we create life within a lifeless body.
By now, you may find the concept of programming easier to grasp. However, the process itself is complex that even programmers get lost in their own creations.
Programs are beautiful when correctly written. Ironically, badly written programs are terrifying.
Introducing JavaScript
Before anything else, you might have been familiar with another programming language called Java. Keep in mind that JavaScript and Java have almost nothing to do with each other.
JavaScript was originally named as Mocha and was created in May 1995. It was the product of 10 days of hard work of Brendan Eich who was, at that time, working at Netscape. The name Mocha was picked by the Netscapes founder, Marc Andreessen.
In September of the same year, the name of the language was changed to LiveScript. In December of the same year, its name changed once again to JavaScript after receiving a trademark license from Sun. Apparently, the name was a marketing move since the Java language was being heavily campaigned and becoming more popular during those times.
Today, JavaScript is one of the programming languages that every beginner can easily learn. It is also a must-learn language for web developers alongside CSS and HTML. Web developers prefer HTML in defining their web content. They use CSS in specifying their web layouts. Lastly, they use JavaScript in programming their websites behavior. And so, JavaScript is considered to be the programming language of the web.
Even though the idea behind JavaScript was to give easier programming realm for beginners, the flexibilities offered by the language has major advantages to veteran programmers as well. It gives you numerous spaces for programming techniques that are impossible to do in more rigid programming languages. You will see more of these techniques later on this book. So if you are not new in programming but just starting to learn JavaScript, dont hate it if it usually interprets the codes you give differently. You just need to be patient and be open because JavaScript is not only fun, but it will bring you to a whole new world of programming.
What Can You Find In This Book?
This book is the first part of JavaScript in Simple Words series. This part of the series features 3 chapters. The first chapter will introduce you to values and how to process these values in JavaScript language. You will learn how to use operators, comparators, and how to create strings. The second chapter discusses variables. In this chapter, you will learn how to assign values inside variables. You will also learn how to create versatile messages by combining multiple variables. The last chapter discusses the creation of JavaScript source files. In this chapter, you will learn how to write JavaScript codes inside the source file properly. In addition, you will learn how to execute this file inside an HTML file.
The JavaScript in Simple Words book series were divided into several parts to help you master the programming language without being overwhelmed. Many beginners quitted because they thought that JavaScript is too much to handle. The entire series aims to bring you right to the heart of JavaScript in the simplest way possible.
Chapter 1 Getting to Know Numbers, Operators, and Strings
Browsing the internet alone gives you access to millions of lines of JavaScript codes. The moment you start your favorite internet browser (e.g. Google Chrome, Mozilla Firefox, and Internet Explorer) and began to visit a certain website, you are already communicating using the JavaScript language.
Next page