Chapter 9 Flashcards

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

How is assignment done in Jack?

A

The keyword “let” must be used in assignments.

let x = 0

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

How are methods or functions called in Jack?

A

The keyword “do” must be used for calling a method or a function outside an expression.

do reduce();

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

What is special about subroutines in Jack?

A

All subroutines must end with a: return

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

In Jack, how much is: 2 + 3 * 4?

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

What are the primitive data types in Jack?

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

How does casting work in Jack?

A

Jack is a weakly typed lanuage. That means there is no casting; a value of any type can be assigned to a variable of any type.

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

How are arrays declared in Jack?

A

Array declaration: Array x; followed by x = Array.new();

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

How are constructors declared in Jack?

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

What kind of variables are there in Jack?

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

Fill the blanks:

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