Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Slices page #61

Open
hutchike opened this issue May 11, 2016 · 0 comments
Open

Error on Slices page #61

hutchike opened this issue May 11, 2016 · 0 comments

Comments

@hutchike
Copy link

On page http://go-book.appspot.com/slices.html

    a_slice = array[5:] // means: a_slice = array[5:9] thus: a contains: f,g,h,i,j
    a_slice = array[:] // means: a_slice = array[0:9] thus: a contains all array elements.

should be:

    a_slice = array[5:] // means: a_slice = array[5:10] thus: a contains: f,g,h,i,j
    a_slice = array[:] // means: a_slice = array[0:10] thus: a contains all array elements.

...because there are 10 elements, not 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant