FIND YOUR NEXT FEW LINES

Results for “or”

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

2638 snippets foundClear filters
GoTesting & reusable helpers

Check whether bytes contain valid JSON

Check whether bytes contain valid JSON using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptArray traversal & selection

Check whether every item matches

JavaScript: every stops at the first failed predicate and returns true for an empty array.

JavaScript✓ Tested
TypeScriptArray traversal & selection

Check whether every item matches

TypeScript: every stops at the first failed predicate and returns true for an empty array.

TypeScript✓ Tested
Bash ScriptsLoops & decisions

Check whether input is a nonnegative integer

Reject empty input and nonnumeric characters before arithmetic.

validation✓ Tested
JavaScriptText handling & Unicode

Check whether text ends with a suffix

JavaScript: Use endsWith for a literal case-sensitive ending.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Check whether text ends with a suffix

TypeScript: Use endsWith for a literal case-sensitive ending.

TypeScript✓ Tested
SQLiteJSON data

Check whether text is valid JSON

Reject malformed input before processing it.

json_valid✓ Tested
JavaScriptText handling & Unicode

Check whether text starts with a prefix

JavaScript: Use startsWith for a literal case-sensitive prefix comparison.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Check whether text starts with a prefix

TypeScript: Use startsWith for a literal case-sensitive prefix comparison.

TypeScript✓ Tested
GoGetting Started

Choose a branch with if and else

Choose a branch with if and else using a complete Go program with explicit sample inputs.

Go✓ Tested
CSSGetting Started

Choose a list-marker style

CSS: Learn how to choose a list-marker style in a complete browser example.

CSS✓ Tested
Docker / ComposeCompose service options

Choose a service’s internal hostname

Docker / Compose: hostname controls the name reported inside the container.

Docker / Compose✓ Tested