Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 155157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:06:21+00:00 2026-05-11T10:06:21+00:00

I searched if JavaScript offers a mean to define symbolic constants, but didn’t find

  • 0

I searched if JavaScript offers a mean to define symbolic constants, but didn’t find anything. Did I miss something ?

Is it a common practices to use const var instead ?

var const MAXIMUM_VALUE = 100;  

Thanx.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:06:22+00:00Added an answer on May 11, 2026 at 10:06 am

    const is not supported by IE, so if you want to support IE that is out of the question.

    As far as I know, and the best way of doing this to keep it simple is to just have a naming convention for your constants like the ever-popular ALL UPPERCASE. There are some examples out there to force constants but they are not worth it for the most part. Alternatively, you could use a function:

    function myConst() { return 'myValue'; } 

    This can of course still be overridden but I’ve seen it used.

    Also see:

    • Are there constants in Javascript?
    • Is it possible to simulate constants in Javascript using closures?
    • Javascript: final / immutable global variables?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched Google for a converter but I did not find anything. Is
Something like this quiz for javascript. http://perfectionkills.com/javascript-quiz/ I have searched it but I came
I searched before asking this question. I didn't find an answer probably because I
i searched for hours for a way to solve my problem but didn't get
Is there any cross-browser bookmark/add to favorites using JavaScript. Searched for some list but
I searched for javascript byte type variables and I can't find byte type variable???
I searched Google for HTML/CSS/JavaScript training videos but I am not able to decide
I have searched here and on Google, but as an inexperienced Javascript hack I'm
I've searched for client side javascript chart which supports KO.js but haven't been able
I'm having trouble understanding callbacks in javascript. I've searched through stack overflow but haven't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.