You are viewing a single comment's thread from:
RE: Block.ops - An Analysis Tool - Account Creation, Account Claiming, Follows, Unfollows, Reblogs, Power Ups, Power Downs and More!
Thanks @justyy. That's some great feedback. And very prompt!
Just a question on 4. (let vs var)...
I use atom as my code editor. When I start a for loop it automatically prompts with this default code:
for (var i = 0; i < array.length; i++) {
array[i]
}
I've now had feedback on both the var being a bad choice and the i++ being dangerous. Is it just bad code?
There are different opinions, I wouldn't consider this is a bad code. The JS is evolving quickly, especially the ES6, ES7 or even ES8, so you will find some syntax sugars e.g. even to replace the
for
loop with map, reduce and filter.. The old-style JS still works but depreciated.