1/46
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
User Interface (UI)
The "User Interface" or UI of an app refers to how a person (user) interacts with the computer or app.
UI Element
or objects, like buttons, images, text boxes, pull down menus, screens and so on.
Events
an action that causes something to happen
Event-driven program
a program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)
Event handling
an overarching term for the coding tasks involved in making your app respond to events by triggering functions.
Event listener
a command that can be set up to trigger a function when a particular type of event occurs on a particular UI element.
Callback function
a function specified as part of an event listener; it is written by the programmer but called by the system as the result of an event trigger.
Debugging
Finding and fixing problems in your code or algorithm
User Interface (UI)
The visual elements of a program through which a user controls or communicates with the application
Variable
In JavaScript (and most programming languages) the most primitive type of memory you can use is called a variable. It's called a variable because it's a piece of memory in which you can change what's stored - its value can vary.
Expression
Any valid unit of code that resolves to a single value. (Variables can be assigned values that are the result of an expression.)
Data Type
All values in a programming language have a "type" - such as a Number, Boolean, or String - that dictates how the computer will interpret it. For example 7+5 is interpreted differently from "7"+"5"
create
using the var command.
assign
store a value in memory; you use the = operator.
re-assignment
to change the value of a variable based on its current value.
Variable Scope
dictates what portions of the code can "see" or use a variable, typically derived from where the variable was first created. (See Global v. Local)
Global Variable
A variable whose scope is "global" to the program, it can be used and updated by any part of the code. Its global scope is typically derived from the variable being declared (created) outside of any function, object, or method.
Local Variable
A variable with local scope is one that can only be seen, used and updated by code within the same scope. Typically this means the variable was declared (created) inside a function -- includes function parameter variables.
Concatenate
to link together or join. Typically used when joining together text Strings in programming (e.g. "Hello, "+name)
String
Any sequence of characters between quotation marks (ex: "hello", "42", "this is a string!").
if Statement
The common programming structure that implements "conditional statements".
Conditionals
Another term for if statements -- statements that only run under certain conditions.
Selection
A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.
Boolean Expression
in programming, an expression that evaluates to True or False.
Conditionals
Statements that only run under certain conditions.
If-statement
The common programming structure that implements "conditional statements".
Selection
A generic term for a type of programming statement (usually an if-statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements.
while loop
a programming construct used to repeat a set of commands while a boolean condition is true.
List
A generic term for a programming data structure that holds multiple items.
Array
A data structure in JavaScript used to represent a list.
Code: onEvent
Category: UI Controls- the UI element, with unique id, must exist before the onEvent function can be used.
Event type-
change: specified element has been modified and enter has been pressed
mouseover: user moved the mouse cursor over the specified element
Syntax: onEvent (id, type, function(event))
Helpful Tip:
UI element must be defined in your code before the matching onEvent
Code: setPosition
Positions an element at an x,y screen coordinate, and optionally sets a new width and height for the element
Helpful Tip:
The upper left corner of the UI element is placed at the (x,y) coordinate location
Code: console.log
is used as a debugging tool to help you understand what your code is doing. the user of your app will not see the console.log message.
==
The equality operator (sometimes read: "equal equal") is used to compare two values, and returns a Boolean (true/false). Avoid confusion with the assignment operator "=",