Simple Intro
Computational process is an abstract series of steps and things that determine what goes on inside a computer, and their primary purpose is to process another abstract concept, data.(Abelson, Sussman, 2022, p. 1)
When mistakes are made in programming, they are called bugs. Bugs are generally minor in pure content, but can cause incredible damage in scope depending on the severity of the bug.(Abelson, Sussman, 2022, p. 2)
Master software engineers are able to organize programs to work in the most optimal and reasonable way, allowing the results to be as accurate to the intent of the program. If issues occur, they are able to debug their programs.(Abelson, Sussman, 2022, p. 2)
JavaScript
Background
JavaScript was developed in 1995 and is a programming language that allows scripts to be ran within websites.(Abelson, Sussman, 2022, p. 2) It was originally named Mocha, then renamed to LiveScript, and then finally JavaScript, and is a trademark of Oracle Corporation.(Abelson, Sussman, 2022, p. 3)
Despite its original purpose, JavaScript can be used as a general programming language. The first interpreter for it was developed for the Netscape browser, but would later be developed for future browsers as well like Internet Explorer. It shares little with Java as a programming language, with the only things they share are the name and block structure they use for programming, similar to C.(Abelson, Sussman, 2022, p. 4)
Elements of Programming
Each programming language has three mechanisms for implementing our ideas into reality:
- primitive expressions, which represent the simplest entities the language is concerned with,
- means of combination, by which compound elements are built from simpler ones, and
- means of abstraction, by which compound elements can be named and manipulated as units.
Data is the stuff we can manipulate, while functions are descriptions of rules for manipulating the data.(Abelson, Sussman, 2022, p. 5)
Expressions
In JavaScript, you type statements and the interpreter evaluates your statement. Sometimes this will be an expression, followed by a semicolon(;).(Abelson, Sussman, 2022, p. 6)
486;
The interpreter will respond with the following:
486
You can also use operators to form a compound expression:
Example 1:
137 + 349;
486
Example 2:
1000 - 334;
666
Example 3:
5 * 99;
495
Example 4:
10 / 4;
2.5
Example 5:
2.7 + 10;
12.7
The expressions above, which contain multiple expressions, are called combinations, which are formed with an operator symbol symbol in the statement, with the operand expressions around them, which then create operator combinations.(Abelson, Sussman, 2022, p. 7)