Chapter 4 End Flashcards

(3 cards)

1
Q

powerful and unique, provides shorthand method of expressing a simple if/else statement; considered a ternary operator; performs operation as if (exp1) exp 2, else exp3

format: exp ? exp : exp

A

conditional operator

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

variable can only be accessed within braces it was declared

A

local scope

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

variable may be used in part of program between its definition and the block’s closing brace

A

block scope

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