FIND YOUR NEXT FEW LINES
Results for “Lists & control flow”
Small, practical examples. Search by task or narrow things down below.
172 snippets foundClear filters
Submit a readonly value while preventing edits
HTML: Readonly controls remain in form data, unlike disabled controls.
HTML✓ Tested
Swap two integers
Use a temporary value to swap C integers without arithmetic overflow.
C✓ Tested
Transform each item in a collection
Build a result array with a foreach expression.
foreach✓ Tested
Truncate a single line
Combine CSS overflow and ellipsis for a constrained single line.
CSS✓ Tested