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.
Run code runs your code once for each case. It compares what your code prints with the expected output.
Starter code
or press Ctrl EnterNot run yet
cases
Not run yetA limit of 0 and an empty label
Expected output
1
retries: 02
label: bookingSee the input and the code for this case
const settings = { retries: 0, label: "" };Not run yetA limit of 2 and a label
Expected output
1
retries: 22
label: night shiftSee the input and the code for this case
const settings = { retries: 2, label: "night shift" };Not run yetAn empty settings object
Expected output
1
retries: 32
label: bookingSee the input and the code for this case
const settings = {};Not run yetThe settings object is missing
Expected output
1
retries: 32
label: bookingSee the input and the code for this case
const settings = undefined;