showing results for - "javascript check if string ends with space"
Sara
03 Sep 2017
1    const str = "hello world ";
2    const a = str.slice(-1);
3    if (a == " ") {
4        console.log("ends with space");
5
6    }
queries leading to this page
check if a string contain space jscheck whether string contains space in starting or end of the string javascriptjavascript check if string is just spacescheck if string starts with space javascriptjs check if a string contain spacecheck if string contains space element javascriptif string has space javascriptcheck if a string contains space javascriptif only space string jscheck if only space in string javascripthow to check if a string contains a space javascripthow to check if string contains space javascriptcheck if string ends with symbol or space javasscriptjs check if space in stringhow to check string contains space in javascriptcheck if string contains space javascriptjavascript check if string is just spacehow to check if a space is in a string jscheck if string has space javascriptif string contains space javascriptcheck if string has space jshow to check if a string contains space in javascriptcheck if space character javascriptdetect if string contain space javascriptjs check if string contains spacejavascript check if string is a space check if space in string javascriptstring method to find if it contains space in jshow to check if a string has space in jshow to check if string space in jscheck the string with space and with out space in javascript or conditioncheck if there is space after string javascripthow to check if a string contains a space in jshow to check if string contains space in javascriptcheck if there is space in string javascriptstring contains space javascriptif space in string jsjavascript check if string ends with space