JSFiddle - React, Tailwind, and code Playground

if last character is space

by Shah Danial

JavaScript

//if last character is space...


var str = 'hahah ahskjkajksaks K';

if(str){
console.log(str[str.length - 1]);
}