Assessment 01 · Answers and scoring
Each answer has one conclusion point and one reasoning/evidence point. Total 12.
- Zero can render. Use
places === 0 ? 'Currently full' : ...or an explicit boolean condition for a positive-only message. The logical-and expression returns the numeric zero rather than false. - The assertion adds no runtime inspection and types are not a JSON validator. Treat the response body as unknown and pass it through a runtime parser checking individual fields and collection-level uniqueness. This is a must-correct boundary question.
- Both direct updates request six from the same snapshot. Two
previous => previous + 1transformations produce seven because they process the queued pending value in sequence. - Query is independently changed by the user; visibleEvents and its length can be derived from data and query. Duplicated stored results can disagree, such as three cards with a count of four.
- No. A stable key helps retain the same item during reordering within the list, but filtering it out unmounts it and discards its local state. Lift a choice to a lasting owner if it must survive removal. This is a must-correct identity question.
- Store stable IDs. Derive saved records from the current dataset, so a current record supplies the title. Decide how to handle IDs absent from that dataset rather than rendering stale copied objects.
For the experiment, require a prediction, the exact interaction and observed result. A copied output without explaining the snapshot or lifetime earns no evidence point on the related question.