See the info abouts constants: https://docs.mendix.com/refguide/constants#4-2-exposed-to-client
With the expose to client option you can use it in page expressions or nanoflows
while creating the constant the default value is the value you set to constant
and it will be available if you “on”expose it to the client as mentioned by Maarten
added a snap for refernce
In addition to the answer of Maarten.
Personally, I’m using constant for those reasons:
In case of your question, you want to set a constant and show in the UI. For example for an application name or application version number, it’s OK. To do something user specific or data specific, I think you need to use variables.