i have written the code as below but output is not showning my webpage.
Hi @dheerajswaroop15,
Check this answer Javascript functions