Retool Interview Question

Q. Get the following code base to print the right output