const one = 1
# Constants in Ruby being with a capital letter. Will throw a warning or error, depending on runtime settings.
Name = "John"
# Not a constant
name = "John"
constants
Opened = 1
Closed = 2
const FOO = 123;
const void* BAR = null;
const PI = 3.14159265359
`static` keyword
Languages with Constants include C, JavaScript, Java, PHP, Ruby, Go, C#, Kotlin, Rust, Julia, Dart, Objective-C, Chapel, Groovy, F#, Speedie, C3, C2, Jule, Aardvark, SystemVerilog, Apex, Angelscript, Eclipse Command Language, nimrod
Languages without Constants include progsbase
View all concepts with or missing a hasConstants measurement
Read more about Constants on the web: 1.