1. What is a program?
A program is many things. It is a piece of text typed by a programmer,
it is the directing force that makes the computer do what it does, it is data
in the computerâs memory, yet it controls the actions performed on this same
memory. A program is a building of thought. It is costless to build, it is weightless,
and it grows easily under our typing hands.
2. What can you say about complexity in programming?
Without care, a programâs size and complexity will grow out of control,
confusing even the person who created it. Keeping programs under control is
the main problem of programming. The art of programming is the skill of controlling complexity. The great program is subduedâmade simple in its complexity.
3. What function do programming languages have?
Functions are the bread and butter of JavaScript programming. The concept
of wrapping a piece of program in a value has many uses. It gives us a way
to structure larger programs, to reduce repetition, to associate names with
subprograms, and to isolate these subprograms from each other.
A function definition is a regular binding where the value of the binding is
a function. For example, this code defines square to refer to a function that
produces the square of a given number:
const square = function(x) {
return x * x;
};
4. What is the relationship between Java and Javascript?
It is important to note that JavaScript has almost nothing to do with the
programming language named Java. The similar name was inspired by marketing
considerations rather than good judgment. When JavaScript was being
introduced, the Java language was being heavily marketed and was gaining
popularity. Someone thought it was a good idea to try to ride along on this
success. Now we are stuck with the name.
5. What is ECMAScript and how is it related to Javascript?
After its adoption outside of Netscape, a standard document was written
to describe the way the JavaScript language should work so that the various
pieces of software that claimed to support JavaScript were actually talking
about the same language. This is called the ECMAScript standard, after the
Ecma International organization that did the standardization. In practice, the
terms ECMAScript and JavaScript can be used interchangeablyâthey are two
names for the same language.