课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
Array methods
- [Instructor] Arrays are used a lot in JavaScript. So there's a whole array of array methods to do things with arrays and their contents. All of these methods are heavily documented with examples in the MDN web docs. You can find them under static methods and instance methods. And this whole page is well-worth a read once you're finished with the course. In the meantime, let's look at some of these methods in more detail. In the exercise files for this movie, I've set up a basic array called backpackContents. It contains three items: piggy, headlamp, and pen, and when we output it, you see them over here in the browser. All right. So far, nothing new. A very common thing we want to do with an array is just output all of these values in the array as a string. This can be done using the join method and the join method is added directly to the object itself. So I'll just say .join, and then call it as a method by…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。