From the course: Sass Essential Training

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Using lists

Using lists

- [Tutor] You can use lists to create an array type object that helps you go through a group of items easily. Arrays are one of the more flexible data types in SaaS. You can create them by using either comas or spaces. You can also use optional brackets or parentheses. If you're passing along an element that already has spaces, then you'll need to add quotes to the item or it will think that it's a new element. And now this is a little bit weird but arrays are one index. So the first element is element number one, this is different than in most other programming languages, including JavaScript. So make sure that you watch out for that. You can even include negative indexes. Now this sounds weird, but it can be useful to get the last element in an array.. List values are also immutable, which means that their contents never change. When we attempt to change lists, we actually create a new copy in order to avoid potential…

Contents