In my current project, I have implemented a view that can switch between two modes: view mode and edit mode. With the use of Angular directives, I am able to modify the behavior of the page depending on the selected mode. In C programming, it is common practice to #DEF some constant strings for future reference. I am curious if there is a similar design pattern in JavaScript that I could utilize. For instance, I plan to implement something like:
<input ng-if="mode==='edit'"></input>
Take note of the string literal 'edit'