📌  相关文章
📜  javascript 检查字符串是否以空格结尾 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:41.403000             🧑  作者: Mango

代码示例1
const str = "hello world ";
    const a = str.slice(-1);
    if (a == " ") {
        console.log("ends with space");

    }