string.trim
const greeting = ' Hello world! ';
greeting; // " Hello world! "
greeting.trim(); // "Hello world!"Syntax
str.trim()return value
Description
Examples
trim() μ¬μ©νκΈ°
const orig1 = ' foo ';
orig1.trim(); // "foo"
const orig2 = 'foo ';
orig2.trim(); // "foo"Polyfill
Last updated