Regex to remove spaces

by John Doe

JavaScript

// Regex to remove spaces...

$(function(){
    
var n1 = "test een twee drie            s";

    var n2 =  n1.replace(/\s/g, "");
    
    $('body').append(n2);

});