vocab review apcsp 2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/46

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

47 Terms

1
New cards

User Interface (UI)

The "User Interface" or UI of an app refers to how a person (user) interacts with the computer or app.

2
New cards

UI Element

or objects, like buttons, images, text boxes, pull down menus, screens and so on.

3
New cards

Events

an action that causes something to happen

4
New cards

Event-driven program

a program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)

5
New cards

Event handling

an overarching term for the coding tasks involved in making your app respond to events by triggering functions.

6
New cards

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.

7
New cards

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.

8
New cards

Debugging

Finding and fixing problems in your code or algorithm

9
New cards

User Interface (UI)

The visual elements of a program through which a user controls or communicates with the application

10
New cards

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.

11
New cards

Expression

Any valid unit of code that resolves to a single value. (Variables can be assigned values that are the result of an expression.)

12
New cards

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"

13
New cards

create

using the var command.

14
New cards

assign

store a value in memory; you use the = operator.

15
New cards

re-assignment

to change the value of a variable based on its current value.

16
New cards

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)

17
New cards

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.

18
New cards

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.

19
New cards

Concatenate

to link together or join. Typically used when joining together text Strings in programming (e.g. "Hello, "+name)

20
New cards

String

Any sequence of characters between quotation marks (ex: "hello", "42", "this is a string!").

21
New cards

if Statement

The common programming structure that implements "conditional statements".

22
New cards

Conditionals

Another term for if statements -- statements that only run under certain conditions.

23
New cards

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.

24
New cards

Boolean Expression

in programming, an expression that evaluates to True or False.

25
New cards

Conditionals

Statements that only run under certain conditions.

26
New cards

If-statement

The common programming structure that implements "conditional statements".

27
New cards

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.

28
New cards

while loop

a programming construct used to repeat a set of commands while a boolean condition is true.

29
New cards

List

A generic term for a programming data structure that holds multiple items.

30
New cards

Array

A data structure in JavaScript used to represent a list.

31
New cards

Code: onEvent

Category: UI Controls- the UI element, with unique id, must exist before the onEvent function can be used.

32
New cards
33
New cards

Event type-

34
New cards

change: specified element has been modified and enter has been pressed

35
New cards
36
New cards

mouseover: user moved the mouse cursor over the specified element

37
New cards
38
New cards

Syntax: onEvent (id, type, function(event))

39
New cards
40
New cards

Helpful Tip:

41
New cards

UI element must be defined in your code before the matching onEvent

42
New cards

Code: setPosition

Positions an element at an x,y screen coordinate, and optionally sets a new width and height for the element

43
New cards
44
New cards

Helpful Tip:

45
New cards

The upper left corner of the UI element is placed at the (x,y) coordinate location

46
New cards

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.

47
New cards

==

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 "=",