Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Welcome to the On-Call Rota

In JavaScript, one ordered collection, the array, does the work of Python’s lists, and often of its tuples, and its methods take over from Python’s slicing, del, remove(), and sorted(). Your project is to port a support team’s Python script that decides who carries the pager each week.

Here’s a first taste, with the pager’s numbers: how many times it went off each week over the last eight weeks. This Python code sorts them smallest first:

Language: Python
pages = [3, 9, 0, 14, 2, 7, 4, 11]
pages.sort()
print(pages)

Python prints the counts in order:

Language: Program Output
[0, 2, 3, 4, 7, 9, 11, 14]

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.