Keep zero, replace an empty label

Choose a default according to what each setting allows.

your task

Keep a retry limit of 0. Use 3 when the limit is missing. Use “booking” for an empty or missing label. Print retries first and the label second, even when settings is missing.

The report replaces a retry limit of 0 and keeps a blank label. It also stops when settings is missing. A limit of 0 means the test must never retry.

Starter code
or press Ctrl EnterNot run yet

cases

Not run yetA limit of 0 and an empty label

Expected output

1retries: 0
2label: booking
See the input and the code for this case
const settings = { retries: 0, label: "" };
Not run yetA limit of 2 and a label

Expected output

1retries: 2
2label: night shift
See the input and the code for this case
const settings = { retries: 2, label: "night shift" };
Not run yetAn empty settings object

Expected output

1retries: 3
2label: booking
See the input and the code for this case
const settings = {};
Not run yetThe settings object is missing

Expected output

1retries: 3
2label: booking
See the input and the code for this case
const settings = undefined;