Results for “Type & reading flow”
Small, practical examples. Search by task or narrow things down below.
Remove a list item by identifier
Remove a list item by identifier with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Remove a Map entry and detect whether it existed
TypeScript: Map.delete returns true only when an entry was present.
TypeScript✓ Tested
Render groups with nested loops
Render groups with nested loops with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Reorder captured text in a replacement
TypeScript: Use numbered replacement groups to rearrange a known two-part name.
TypeScript✓ Tested
Repeat a fixed number of times
TypeScript: Use a counted loop to print three numbered steps.
TypeScript✓ Tested
Repeat a string a fixed number of times
TypeScript: String.repeat requires a nonnegative finite repetition count.
TypeScript✓ Tested
Repeat while a condition holds
TypeScript: Count down while a positive number remains, updating the loop variable on each iteration.
TypeScript✓ Tested
Replace an array segment in place
TypeScript: splice returns removed items and inserts replacements at the chosen position.
TypeScript✓ Tested
Replace one collection element
TypeScript: Update an existing element at a known valid index.
TypeScript✓ Tested
Represent a finite set of states
Java: Use an enum to prevent arbitrary strings from representing application states.
Java✓ Tested
Require two conditions to be true
TypeScript: Combine a lower and an upper bound to check whether a value is in range.
TypeScript✓ Tested
Reserve space for a visible border
CSS: A border adds to the outer dimensions of a content-box element.
CSS✓ Tested