I think you mean aristotle

This commit is contained in:
Firas Khalil Khana
2021-05-01 13:24:44 +03:00
committed by İnanç Gümüş
parent d510b0481c
commit 60dd1b2cca
2 changed files with 9 additions and 9 deletions

View File

@ -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" "" ""]
//
//
// ...

View File

@ -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)
// ########################################################