Programming Flashcards

1
Q

Callback function

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Event

A

An action that causes something to happen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Event-driven program

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Event handling

A

an overarching term for the coding tasks involved in making a program respond to events by triggering functions

coding tasks involved in making your app respond to events by triggering functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Event listener

A

a command that can be set up to trigger a function when a particular type of event occurs on a particular UI element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

UI Elements

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

User Interface

A

The visual elements of a program through which a user controls or communicates with the application. Often abbreviated UI.
refers to how a person (user) interacts with the computer or app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Users trigger events

A

Events occur when users click a button, tap the screen, move the mouse, type a key on the keyboard, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what does context sensitive mean?

A

properties tab is context sensitive which means that the set of properties you see depends on what you click on in the application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is an element id?

A

you refer to the element in your code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

UI Elements

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

UI Events

A

controls, like click, scroll, move mouse, type keyboard key, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Events trigger code

A

When an event occurs or “fires” it can be used to trigger a particular javascript function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

debugging

A

writing any code and it’s an error, or didn’t work for any other reason and you dug in and figured out why and fixed it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

characteristics of IDs

A

case sensitive
cannot contain spaces
must begin with a letter (A-Z or a-z) and may be followed by any number of digits and letter
can contain hyphens “-“, “_”, “.”, “:”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

rules with variables

A

use “var” only once
create your variables at the top of your program
create variables outside onEvent blocks

17
Q

global variables

A

Permanent. Can be used anywhere in your code
var used outside an onEvent

18
Q

local variable

A

Temporary. Can be used only in the part of the code where it was created, like inside an onEvent. Deleted once the onEvent is done running.
var used inside an onEvent

19
Q

what do if-else-if commands do

A

lets you check multiple boolean conditions

20
Q

what are boolean conditions?

A

a conditional expression
consists of chained conditionals and nested conditionals

21
Q

how will computers check if-else-if commands?

A

check conditions in the order they are written until one of the boolean expressions evaluates to true
code associated with that boolean expression will be run, but all others will be skipped
If none of the expressions evaluates to true then the code inside the else command will be run.

22
Q

how to write if-else-if statments?

A

most specific cases first

23
Q

chained conditionals

A

else/else-if

24
Q

nested conditionals

A

if statements inside of if statements

25
Q

pseudocode

A

structural conventions of a programming language, but is intended for human rather than machine reading

26
Q

is not equal to in javascript

A

!=

27
Q

NOT operator

A

!
evaluates to the opposite truth value of the statement provided as input

28
Q

placement of NOT operator

A

place the expression to which you want to apply the NOT within parentheses
ex. if (!(expr))

29
Q

AND operator

A

&&
evaluates to true only when both boolean statements it connects are true

30
Q

what does the AND operator help with?

A

redundancy and improved overall readability

31
Q

placement of AND operator

A

place each boolean expression inside of itws own parenthesis
ex. if ((age=>13) && (age<20)) {

32
Q

OR operator

A

||
evaluates to true as long as at least one of the boolean statements it connects is true

33
Q

what does OR operator help with?

A

redundancy and readability

34
Q

placement of OR operator

A

placed each boolean expression insdie its own parentheses
ex. if ((day == “Saturday”) || (day == “Sunday”)) {