CodeHS Unit 7 Test questions and answers
CodeHS Unit 7 Test questions and answers What is an array (or list)? 1. An ordered collection of items 2. An unordered collection of items 3. A function 4. A type of loop 1. An ordered collection of items We want to make a grocery list in our program. Which of the following is the correct way to make an array/list? var groceries = ["milk", "sugar", "eggs", "cake"]; What is the index of the very first item in an array? 0 Which line of code will correctly change "cake" to "apples"? var shoppingList = ["milk", "eggs", "sugar", "bread", "cake"]; shoppingList[4] = "apples"; What index refers to the "end" of an array? The highest index How can we add a 5 to th
Written for
- Institution
- CodeHS Unit 7 Tet
- Module
- CodeHS Unit 7 Tet
Document information
- Uploaded on
- February 23, 2024
- Number of pages
- 4
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
codehs unit 7 test
-
what is an array or list 1 an ordered collecti
Also available in package deal