Chapter 9 Flashcards
How is assignment done in Jack?
The keyword “let” must be used in assignments.
let x = 0
How are methods or functions called in Jack?
The keyword “do” must be used for calling a method or a function outside an expression.
do reduce();
What is special about subroutines in Jack?
All subroutines must end with a: return
In Jack, how much is: 2 + 3 * 4?
What are the primitive data types in Jack?
How does casting work in Jack?
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 are arrays declared in Jack?
Array declaration: Array x; followed by x = Array.new();
How are constructors declared in Jack?
What kind of variables are there in Jack?
Fill the blanks: