Transcript from the "Semicolons and Q&A" Lesson
[00:00:29] There's some people that prefer writing code this way. There are other people that don't like writing code this way. I'm just showing you so you know that it is technically valid. And I don't care [LAUGH]. I really don't. Now I just have a tool that inserts it for me automatically.
>> Brian Holt: But that's what it's for.
It's for ending a sentence or ending a statement.
>> Brian Holt: Okay.
>> Brian Holt: Just so you know, I have yeah, go ahead.
>> Speaker 2: Can we use var to declare a variable?.
>> Brian Holt: So there is an old way of doing it. That's a good question. Can we use a var? So there is a var like this.
This is the old way of doing it.
>> Brian Holt: There are people that would disagree with me, but I would say never use var ever, cuz there's no reason to. I think constant let totally eclipsed the need for var. It has some different semantics, but you can logically think that it works like let, right?
So notice, this still works with var, I was able to reassign it here. I choose not to use var. Kyle Simpson would fight me on it and he would be wrong, yeah.
>> Speaker 3: I notice so far you're only using integers, will let and constant still allow you to go into decimal places?
>> Brian Holt: Yes, so you can see here, I can change that to be.
[00:02:25] There's no difference between them. There's just one number type. And we'll get into other things like strings here in a second. But does that answer your question? Cool.