Efficiency of val and var

In this video, arnav bhaia suggested that if a variable value is not changing then we should use val instead of var.

So, i want to ask is there any performance issue because even if we use var our job will be done. i know that var is used when variable is changing its values.

so, in the end will changing the variable from var to val will make the effciency of code better?

var/val doesn’t make any performance difference.

as val is immutable, when you share your code or read others code it helps understanding it is a final variable.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.