how to grab last html message code example
Example 1: javascript get last character in string
var hello = "Hello World";
var lastCharOfHello=hello.slice(-1);//d
Example 2: apply css on last child in parent div
.parent > *:last-child {
background-color: red;
}