Check out example codes for "new command - latex". It will help you in understanding the concepts better.

Code Example 1

\newcommand{\reverseconcat}[3]{\bfseries#3#2#1} % version 2

Learn ReactJs, React Native from akashmittal.com