Language Flashcards
Increase your technical jargon and learn the exact words to describe your code. (95 cards)
What is Code?
Code is the text that makes up programs.
What is an Expression?
A fragment of code that produces a value. Every value that is written literally is an expression.
What is a Statement?
If an expression corresponds to a sentence fragment, a JavaScript statement corresponds to a full sentence. A program is a list of statements.
If an expression corresponds to a sentence fragment, a JavaScript statement corresponds to a full sentence. A program is a list of statements.
What is a Binding?
To catch and hold values, JavaScript provides a thing called a binding, or variables.
What is the Environment?
The collection of bindings and their values that exist at a given time is called the environment.
What is a Function?
A function is a piece of program wrapped in a value. Such values can be applied in order to run the wrapped program.
What is a Program?
A program is a collection of statements, which contain expressions that are executed from top to bottom.
What is scope?
The part of the program where the binding is visible.
What is lexical scoping
The set of bindings visible inside a block is determined by the place of that block in the program text. Each local scope can also see all the local scopes that contain it, and all scopes can see the global scope. This approach to binding visibility is called lexical scoping.
What is Closure?
A feature of a function that allows there to be a reference to a specific instance of a local binding in an enclosing scope.
What is an example of Closure?
function multiplier(factor) { return number => number * factor; } let twice = multiplier(2); console.log(twice(5)); // → 10
What is Recursion?
A function that calls itself.
What is an example of a recursive function?
function findSolution(target) { function find(current, history) { if (current == target) { return history; } else if (current > target) { return null; } else { return find(current + 5, `(${history} + 5)`) || find(current * 3, `(${history} * 3)`); } } return find(1, "1");
What is control flow?
Enables us to decide which lines are run based on our code base.
What is coercion?
A way in which we can implicitly or explicitly change the value of datatypes.
What does lexically scoped mean?
The location at which a variable is declared determines its scope.
What is a ReferenceError?
An error where the program could not find any reference to the variable; possible the variable doesn’t exist.
What is a compiler?
A compiler is a program that converts your Java program into code called bytecode.
- checks program for syntax errors
- generates a new program that is readable by the language.
What does the diagram for the Java Runtime Environment look like?
- Source code: ‘human readable code’ = file extension.”java”;
- Compiler
- Bytecode: ‘JVM readable code’ = file extension.”class”
- Windows, Mac, Linux
What is OOP?
Object-oriented programming is an approach to programming that uses the concept of classes and objects.
What are three kinds of scopes?
Global Scope, Function Scope, and Block Scope (created by ‘let’)
What is projection?
Applying a function to a value and creating a new value is called a projection. To project one array into another, we apply a projection function to each item in the array and collect the results in a new array.
What is React?
React is a JavaScript library used for building user interfaces.
What is Redux in terms of React?
A way to manage state within React.