/**
 * @param {string} s
 * @return {number}
 */
var lengthOfLastWord = function(s) {
    let words = s.split(" ").filter((word) => word!="");
    return words.pop().length
};
For further actions, you may consider blocking this person and/or reporting abuse
 

 
    
Top comments (0)