diff --git a/16-slices/exercises/22-adv-ops-practice/main.go b/16-slices/exercises/22-adv-ops-practice/main.go index e401cba..f216af3 100644 --- a/16-slices/exercises/22-adv-ops-practice/main.go +++ b/16-slices/exercises/22-adv-ops-practice/main.go @@ -37,7 +37,7 @@ func main() { // // #2: Append the following names to the names slice: // - // "einstein", "tesla", "aristo" + // "einstein", "tesla", "aristotle" // // Print the names slice. // @@ -58,10 +58,10 @@ func main() { // // Then append the following names to the slice: // - // "einstein", "tesla", "aristo" + // "einstein", "tesla", "aristotle" // // Expected output: - // ["einstein", "tesla", "aristo" "" ""] + // ["einstein", "tesla", "aristotle" "" ""] // // // ... diff --git a/16-slices/exercises/22-adv-ops-practice/solution/main.go b/16-slices/exercises/22-adv-ops-practice/solution/main.go index abe550c..5ef9d39 100644 --- a/16-slices/exercises/22-adv-ops-practice/solution/main.go +++ b/16-slices/exercises/22-adv-ops-practice/solution/main.go @@ -25,16 +25,16 @@ func main() { // // #2: Append the following names to the names slice: // - // "einstein", "tesla", "aristo" + // "einstein", "tesla", "aristotle" // // Print the names slice. // // Observe how the slice and its backing array change. // // Expected output: - // ["" "" "" "" "" "einstein", "tesla", "aristo"] + // ["" "" "" "" "" "einstein", "tesla", "aristotle"] // - names = append(names, "einstein", "tesla", "aristo") + names = append(names, "einstein", "tesla", "aristotle") s.Show("2nd step", names) // ######################################################## @@ -48,15 +48,15 @@ func main() { // // Then append the following names to the slice: // - // "einstein", "tesla", "aristo" + // "einstein", "tesla", "aristotle" // // Expected output: - // ["einstein", "tesla", "aristo" "" ""] + // ["einstein", "tesla", "aristotle" "" ""] // // So: Overwrite and print the names slice. // names = make([]string, 0, 5) - names = append(names, "einstein", "tesla", "aristo") + names = append(names, "einstein", "tesla", "aristotle") s.Show("3rd step", names) // ########################################################