for (let i = 0; i < spec.switch.length; i++) { }