OneCompiler

count the total White Space in JS

147

var name ="rohit kumar kannaujiya";
var totalWhiteSpace=(name.split(' ').length-1)
console.log(totalWhiteSpace)