In the Kotlin lesson to initialize variables (https://www.codecademy.com/courses/learn-kotlin/lessons/kotlin-data-types-variables/exercises/declaring-a-variable) it tells us that when you initiate a variable you must format it as such:
var todaysDate: String = "11/02/2020"
I don’t understand the need for it. Simply declaring it as
var todaysDate = "11/02/2020"
prints the variable just the same. Is this to lock the variable to a data type?
Edit: It can’t be to lock it to a certain data type, as, after some testing, even without declaring the type, it still won’t let you assign, for example an integer to a string variable. So what purpose does that serve?