Prefer const vs let for variables that are only declared once
Requires that variable declarations use `const` instead of `let` and `var` if possible. This is mostly for code readability, performance wins are debatable.
This commit is contained in:
@@ -51,7 +51,7 @@ describe('SelectionManager', () => {
|
||||
});
|
||||
|
||||
function stringToRow(text: string): LineData {
|
||||
let result: LineData = [];
|
||||
const result: LineData = [];
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
result.push([0, text.charAt(i), 1, text.charCodeAt(i)]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user