array := [6]int{10, 11, 12 ,13, 14, 15} slice := array[2:4]

the slice output is [12, 13], why not include value 14?

The slice starts from the second element of the array which has value 12."

does element means the table " | "?

|10|11|12|13|14|15|

0 1 2 3 4 5 6

Reply to this note

Please Login to reply.

Discussion

|10|11|12|13|14|15|

0--1---2---3---4---5---6