FIND YOUR NEXT FEW LINES

Results for “or”

Small, practical examples. Search by task or narrow things down below.

2638 snippets foundClear filters
ReactGetting Started

Display a JavaScript value in JSX

Display a JavaScript value in JSX with a small React component and explicit browser behavior.

React✓ Tested
CSSType & reading flow

Display a label in uppercase without changing its text

CSS: Text-transform changes visual casing while preserving the DOM’s source text.

CSS✓ Tested
JavaScriptNumbers & numeric validation

Display a number with a fixed decimal width

JavaScript: toFixed returns a formatted string rather than a numeric value.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Display a number with a fixed decimal width

TypeScript: toFixed returns a formatted string rather than a numeric value.

TypeScript✓ Tested
ReactLists & filtering

Display a slice of paginated data

Display a slice of paginated data with a small React component and explicit browser behavior.

React✓ Tested
GoDates & times

Display an instant at a fixed offset

Display an instant at a fixed offset using a complete Go program with explicit sample inputs.

Go✓ Tested
HTMLData & disclosure

Display code as text

Escape angle brackets in preformatted HTML code samples.

HTML✓ Tested
HTMLGetting Started

Display reserved characters as text

HTML: Learn how to display reserved characters as text in a complete browser example.

HTML✓ Tested
AngularAccessibility & reusable patterns

Display untrusted-looking text without HTML execution

Display untrusted-looking text without HTML execution with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PowerShellFile operations & integrity

Distinguish a file from a directory

PowerShell: Test-Path can constrain the kind of item that is accepted.

PowerShell✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Distinguish an empty input line from end of input

Bash Scripts: A successful read can return an empty value; its status indicates whether a line was read.

Bash Scripts✓ Tested
GoMaps & sets

Distinguish missing keys from zero values

Distinguish missing keys from zero values using a complete Go program with explicit sample inputs.

Go✓ Tested