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 6037453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:04:34+00:00 2026-05-23T06:04:34+00:00

We are considering adopting the Google JavaScript coding guidelines within our company to maintain

  • 0

We are considering adopting the Google JavaScript coding guidelines within our company to maintain consistency across projects but one thing is confusing me. In the section on constants it says to use the @const keyword annotation for compile-time constant enforcement but I have never come across the @ symbol before. Is this a Google extension or part of the core language?

Here is the full text:

For non-primitives, use the @const annotation.

/**  
* The number of seconds in each of the given units.  
* @type {Object.<number>}  
* @const  
*/
goog.example.SECONDS_TABLE = {  
  minute: 60,
  hour: 60 * 60
  day: 60   * 60 * 24
}

This allows the compiler to enforce constant-ness.

As for the const keyword, Internet Explorer doesn’t parse it, so don’t use it.

  • 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. Editorial Team
    Editorial Team
    2026-05-23T06:04:35+00:00Added an answer on May 23, 2026 at 6:04 am

    JSDoc annotations as this one can be used to give hints to the Google Closure Compiler as described in this page. Again, this is not part of the language, and the use of @constant (beside adding some information for your fellow programmer) is relevant only if you use the closure compiler in your project.

    Hope this will help 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm considering adopting .nettiers for a new project as it seems to provide a
considering that fairly static data should not be re-evaluated but cached instead, I wondered
We are considering adopting MonoTouch and MonoDroid for building a cross platform business App.
Considering this example as a base example. I created the application but when I
Considering that I want to write python code that would run on Google App
Considering developer's perspective , what's the most efficient way to create, maintain, and improve
Considering the following (pointless, but it's for illustration purpose) test class : public class
Considering a server that expose a service through WCF. One of the OperationContract return
Considering this: [Flags] public enum MyEnum { One = 1, Two = 2, Four
Considering such code: class ToBeTested { public: void doForEach() { for (vector<Contained>::iterator it =

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.