I’m aware about this javascript feature. But I think it’s intentional, I mean, its in Javascript itself, not only Replit.
(It works in my console, without a let statement)
Yep it’s definitely a feature of JavaScript, not Replit (it’s your browser running the code, not Replit), as @Raadsel stated.
I believe the reason this works is because in the browser, the global scope is actually the window object. So when you don’t use a keyword to define it, you actually might technically be doing window.i=0. And properties of the window object don’t need to be accessed via window, for example console.log is actually a property of the window when JavaScript is run in your browser.
Youcan use strict mode in a particular function too, if it’s desirable. I would recommend reading about strict mode here first, before you write it on the top of every page!!