Skip to content

Commit 3757219

Browse files
travisleitheadannevk
authored andcommitted
Adjust sample code so it makes more sense
In order for the following line, pop(), to return "employeeB", employeeB needs to be on the "top" of the stack, meaning the splice should remove employeeC at index 2. :)
1 parent 8620aa0 commit 3757219

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6931,7 +6931,7 @@ string "<code>ObservableArray</code>".
69316931
building.employees.push(new Employee("B"));
69326932
building.employees.push(new Employee("C"));
69336933

6934-
building.employees.splice(1, 1);
6934+
building.employees.splice(2, 1);
69356935
const employeeB = building.employees.pop();
69366936

69376937
building.employees = [new Employee("D"), employeeB, new Employee("C")];

0 commit comments

Comments
 (0)