Question - What is the difference between the variable declaration with val and variable declaration with const?
Answer -
Both the variables that are declared with val and const are immutable in nature. But the difference between the variable declaration with val and variable declaration with const is that the value of the const variable must be known at the compile-time. In contrast, the value of the val variable can be assigned at runtime also.