let str = "Sonic Free Games"; str = str.replace(/s+/g, '-').toLowerCase(); console.log(str); // "sonic-free-games"