Check out example codes for "css last child". It will help you in understanding the concepts better.

Code Example 1

li:last-child {
    background-color: lime;

Code Example 2

.parent > *:last-child {
  background-color: red;

Code Example 3

/*This will only work if the last child of someEID has 
the class .myclassName 
if the last child does not have class name us js*/
#someEID .myClassName:last-child {
    background: blue;

Code Example 4

p:last-child {
  font-size: 0.75em;

Code Example 5

var x = document.getElementById("myList").lastElementChild.innerHTML;

Learn ReactJs, React Native from