When working with the TypeScript example above, I encountered 2 errors. The first error was related to `i` in the second console.log due to the use of the 'let' keyword. The second error was regarding 'test' in the first line, stating it as a Duplication Function implementation. Any suggestions or insights on how to address these issues?
function test(){
for(let i=0; i<5; i++){
console.log(i);
}
console.log("finally:" + i);
}
test();