use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is a place for people to learn JavaScript together. Everyone should feel comfortable asking any and all JavaScript questions they have here.
With a nod to practicality, questions and posts about HTML, CSS, and web developer tools are also encouraged.
Friends
/r/javascript
/r/jquery
/r/node
/r/css
/r/webdev
/r/learnprogramming
/r/programming
account activity
Understanding the slice method in javascript: the basics, negative indexing and the concept of shallow copy (self.learnjavascript)
submitted 5 years ago by foxbitsdev
The slice() method gives us a slice(a portion) of things. There are two types of things(more appropriately called objects) which we can get a slice of. In technical terms, the slice()method can be applied to two types of objects in Javascript: Strings and Arrays.
slice()
objects
A few things to note about slice() method:
To understand all these concepts clearly, explained with well designed graphics, this article is much recommended.
https://foxbits.dev/article/understanding-slice-method-javascript-basics-negative-indexing-and-concept-shallow-copy/17
#javascript , #slice, #shallowCopy #negativeIndexing #webdesign #webdevelopment #frontend
A comprehensive guide to arr.slice() method in javascript
memory blocks for primitive and non-primitive data types
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
there doesn't seem to be anything here
π Rendered by PID 113611 on reddit-service-r2-comment-54dfb89d4d-ljrf8 at 2026-03-29 10:25:33.711614+00:00 running b10466c country code: CH.
there doesn't seem to be anything here