Files
it-know-how/typescript/bits/08-string-literals.md
2026-03-27 12:58:01 +01:00

327 B
Executable File

String Literals

String literals are text values written directly in code.

Examples

const a = 'year';
const b = "month";
const c = '';

'' is an empty string.

Typical Uses

  • Labels and constants.
  • Comparisons.
  • Fallback values.

Good Practice

Keep quote style consistent with project conventions.