Extract this nested ternary operation into an independent statement for all this block of code: Check the following lines to correct :