const raw = " spaced "; // trim removes surrounding whitespace only console.log(`[${raw.trim()}]`);
strip leading and trailing spaces