trim function to remove white space in js code example
Example: remove space from string javascript
var puzzle1=myTrim($("#puzzleinput").val());
function myTrim(x) {
return x.replace(/^\s+|\s+$/gm,'');
}
var puzzle1=myTrim($("#puzzleinput").val());
function myTrim(x) {
return x.replace(/^\s+|\s+$/gm,'');
}