To see the 4 examples - copy the code and then in Node-RED - click on the hamburger menu top-right - select Import - paste into the big box and click on import
You can then see them all
I personally would think that the template one is the easiest to understand and play around to suit what you want