Numbers (1.609, 86400, 0.05) and strings ('admin', 'USD') inline in code where the value carries domain meaning that the literal alone can't express.
Bare numbers and strings that encode domain concepts become named constants whose name says what the value represents.
Before the refactoring
function trip(distance) {return distance * 1.609;}
After the refactoring
const KM_PER_MILE = 1.609;function trip(distance) {return distance * KM_PER_MILE;}
Searching by domain term ('kilometers per mile') doesn't find the conversion; changing the value means hunting every occurrence; comments accumulate to explain what the constant means.
Naming every literal can drown the file in trivia — only name literals that carry domain meaning the surrounding code can't speak.
Searches by domain term find every callsite; changing the value is one edit; the constant invites code-side documentation when it's truly load-bearing.
Naming every literal — including loop indices, array offsets, status code 200 — drowns the file in trivia and breaks the eye's pattern-recognition for genuinely meaningful constants.