問題文
A loop has to emit a list item of markup for each row, and the markup is easier to read outside the code. How can that be written?
選択肢
- Keep the markup inside the code block as a quoted string and pass it to the function that writes a line of output.
- Keep the markup in a separate content block and call it from inside the loop with the function that includes a block.
- Close the code block before the markup and open a new block after it, keeping the loop keywords split across the two blocks.
- Close the code block before the markup and open a new block after it, repeating the loop keywords inside each of the two blocks.