The pager’s escalation list needs the next three people on call, followed by the managers, Priya and Tom. Your Monday script already gets Dev, Sam, and Ines with rota.slice(0, 3). Now you’ll join those arrays and report the count, so the person holding the pager knows who to wake.
Build the Escalation List
In Python, escalation = rota[:3] + managers produces a new five-person list. Carry that + into JavaScript, with .length replacing len(). Before running this port, predict the result’s type and count:
Language: JavaScript
const rota = ["Dev", "Sam", "Ines", "Kofi", "Bea", "Marta"];
const managers = ["Priya", "Tom"];
const escalation = rota.slice(0, 3) + managers;
console.log(escalation);
console.log(typeof escalation);
console.log(`Escalation list: ${escalation.length} people`);
JavaScript runs without an error and prints: