JavaScript Regex - Hapus Whitespace dari awal dan akhir

let hello = "   Hello, World!  ";
let wsRegex = /^\s+|\s+$/g; 
let result = hello.replace(wsRegex, "");
taylor