Top "Constants" questions

Constants in programming are definitions whose value is fixed throughout a program's execution.

Are variables declared with let or const hoisted?

I have been playing with ES6 for a while and I noticed that while variables declared with var are hoisted …

javascript ecmascript-6 constants let hoisting
C++ Const Usage Explanation

const int* const Method3(const int* const&) const; Can someone explain the usage of each of the const?

c++ constants
Any method to get constant for HTTP GET, POST, PUT, DELETE?

For example, HttpServletResponse has the HTTP status codes as constants like public static final int SC_OK = 200; public static final …

java servlets constants http-method
Namespace constant in C#

Is there any way to define a constant for an entire namespace, rather than just within a class? For example: …

c# namespaces constants
what is the best way to define constant variables python 3

I am writing a program in python which contains many constant variables. I would like to create a file which …

python python-3.x constants configuration-files
When to use static constant and variable in Swift?

There are some posts for how to write code for static constant and static variable in Swift. But it is …

ios swift variables static constants
C++ const map element access

I tried to use the operator[] access the element in a const C++ map, but this method failed. I also …

c++ stl map constants
Constants in MATLAB

I've come into ownership of a bunch of MATLAB code and have noticed a bunch of "magic numbers" scattered about …

matlab constants matlab-class
'this' argument has type const but function is not marked const

Okay so I'm a bit of a noob at C++ and in my second assignment I am required to make …

c++ function constants setter getter
How to use Swift struct in Objective-C

Simply I have a struct that stores the application constants as below: struct Constant { static let ParseApplicationId = "xxx" static let …

objective-c swift constants