How to use constant in javascript


Posted on 28 Dec 15 by Vickey

In javascript we can define constant as below

var constants = {

   'siteUrl': '',


you can write all constant in a single file and include this file in your all pages and where we need this constant we can get it by using 



If this post help you reduce time to develop, you can help me to maintain this website :)