JavaScript 1.1 Flashcards
Define Javascript
“An object-oriented computer programming language commonly used to create interactive effects within web browsers.” -Oxford
What’s the difference between an interpreted language vs a compiled language?
In a compiled language, the target machine directly translates the program. In an interpreted language, the source code is not directly translated by the target machine. Instead, a different program, aka the interpreter, reads and executes the code.
Define object-oriented programming
Object-oriented programming is a model that organizes software design around data or objects rather than function or logic
Define using variables
Variables are used as containers for storing data (values)
Define API
An application programming interface is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software.
What can we use to add special characters within strings?
\ the escape character
Boolean has two values :
true or false
What happens when you place an increment after a given value?
It returns the original value and then the increment. Placing it before will just give us the incremented value.
What does var x += y mean?
x = x + y
Explain what these three are and what they mean! ‘ &&, II, and !’
These are logical operators; && returns true if both ops are true, II returns true if one op is true and ! returns true if the op is false and vice versa
A Javascript function is:
a block of javascript code, that can be executed when “called” for
Create external script that would be placed in a HTML document
script tag, add the source attribute, and then call for js file
In what situations do we use the document.write() function
For testing only, all other existing html gets deleted
Javascript programming is a list of:
“statements”
When it comes to variables, if you want your code to run on old browsers you must use:
“var” keyword