I just start coding in TypeScript. So please excuse my newbie question.
I have this method:
public copyToDest() { for (var i = 0; i < this.source.length; i++) { var item = this.source[i]; if (item && item.isValid) this.dest.push(item); } } Which is working fine. After installing a refactoring tool, I got 2 suggestions:
- Change
var i = 0;tolet i = 0; - Change
var item = ...toconst item = ...
Is there any rule I'm missing about proper use of var, let and const? Or should I just ignore these suggestions?