I think you mean aristotle
This commit is contained in:
committed by
İnanç Gümüş
parent
d510b0481c
commit
60dd1b2cca
@ -37,7 +37,7 @@ func main() {
|
|||||||
//
|
//
|
||||||
// #2: Append the following names to the names slice:
|
// #2: Append the following names to the names slice:
|
||||||
//
|
//
|
||||||
// "einstein", "tesla", "aristo"
|
// "einstein", "tesla", "aristotle"
|
||||||
//
|
//
|
||||||
// Print the names slice.
|
// Print the names slice.
|
||||||
//
|
//
|
||||||
@ -58,10 +58,10 @@ func main() {
|
|||||||
//
|
//
|
||||||
// Then append the following names to the slice:
|
// Then append the following names to the slice:
|
||||||
//
|
//
|
||||||
// "einstein", "tesla", "aristo"
|
// "einstein", "tesla", "aristotle"
|
||||||
//
|
//
|
||||||
// Expected output:
|
// Expected output:
|
||||||
// ["einstein", "tesla", "aristo" "" ""]
|
// ["einstein", "tesla", "aristotle" "" ""]
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// ...
|
// ...
|
||||||
|
@ -25,16 +25,16 @@ func main() {
|
|||||||
//
|
//
|
||||||
// #2: Append the following names to the names slice:
|
// #2: Append the following names to the names slice:
|
||||||
//
|
//
|
||||||
// "einstein", "tesla", "aristo"
|
// "einstein", "tesla", "aristotle"
|
||||||
//
|
//
|
||||||
// Print the names slice.
|
// Print the names slice.
|
||||||
//
|
//
|
||||||
// Observe how the slice and its backing array change.
|
// Observe how the slice and its backing array change.
|
||||||
//
|
//
|
||||||
// Expected output:
|
// 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)
|
s.Show("2nd step", names)
|
||||||
|
|
||||||
// ########################################################
|
// ########################################################
|
||||||
@ -48,15 +48,15 @@ func main() {
|
|||||||
//
|
//
|
||||||
// Then append the following names to the slice:
|
// Then append the following names to the slice:
|
||||||
//
|
//
|
||||||
// "einstein", "tesla", "aristo"
|
// "einstein", "tesla", "aristotle"
|
||||||
//
|
//
|
||||||
// Expected output:
|
// Expected output:
|
||||||
// ["einstein", "tesla", "aristo" "" ""]
|
// ["einstein", "tesla", "aristotle" "" ""]
|
||||||
//
|
//
|
||||||
// So: Overwrite and print the names slice.
|
// So: Overwrite and print the names slice.
|
||||||
//
|
//
|
||||||
names = make([]string, 0, 5)
|
names = make([]string, 0, 5)
|
||||||
names = append(names, "einstein", "tesla", "aristo")
|
names = append(names, "einstein", "tesla", "aristotle")
|
||||||
s.Show("3rd step", names)
|
s.Show("3rd step", names)
|
||||||
|
|
||||||
// ########################################################
|
// ########################################################
|
||||||
|
Reference in New Issue
Block a user