Sort Arrays with JavaScript Methods

提供方
Coursera Project Network
在此指导项目中,您将:

Recognize the variety of ways in which an array's elements can be ordered.

Sort the elements in an array into a specific order.

Use the JavaScript sort() method to sort elements in an array.

Clock2 hours
Intermediate中级
Cloud无需下载
Video分屏视频
Comment Dots英语(English)
Laptop仅限桌面

By the end of this project, you will have gained practical experience in sorting the elements in an array using a JavaScript method. You will learn to reorder the elements in an array using specific techniques based on whether the element values are numbers, letters, mixed-case letters, or objects. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

您要培养的技能

  • Sorting Arrays
  • JS Sort() method
  • Javascript Methods
  • Object arrays
  • javascript syntax

分步进行学习

在与您的工作区一起在分屏中播放的视频中,您的授课教师将指导您完成每个步骤:

  1. Use the JavaScript sort() and reverse() methods to sort elements in an array in alphabetic and reverse alphabetic order.

  2. Use the JavaScript sort() method with toLowerCase() and localeCompare() methods to correctly sort mixed-case elements in an array.

  3. Alter an array sort to use simple math with the JavaScript sort() method to compare the numeric value of elements as they are sorted.

  4. Reorder the elements in an array randomly using the JavaScript sort() method with arguments that include the random() method.

  5. Include a property name in the JavaScript sort() method function to order the elements in an object array by property value.

指导项目工作原理

您的工作空间就是浏览器中的云桌面,无需下载

在分屏视频中,您的授课教师会为您提供分步指导

常见问题

常见问题

还有其他问题吗?请访问 学生帮助中心