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

Difference between subarray() and slice() ? #381

Open
tdd opened this issue Jan 25, 2017 · 0 comments
Open

Difference between subarray() and slice() ? #381

tdd opened this issue Jan 25, 2017 · 0 comments

Comments

@tdd
Copy link

tdd commented Jan 25, 2017

Hi Nicholas,

Location: Chapter 10 > Page 211 > "Additional Methods" > final code example and text below

You describe the subarray method, which for all intents and purposes seems to have identical behavior to the slice method originally from Array. For instance, slice supports the same signature, they both maintain the original array type…

Upon more careful doc reading, it seems subarray creates a sort of view on the original dataset, so modifying the result’s cells would also impact the original typed array? If so, that'd likely be the difference I'm looking for, but it doesn't appear / stand out in your text.

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

2 participants
@tdd and others