Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Grumm18233yMaybe you should start using let when working in js...
I like that variables are scoped. Makes coding easier and clean for others. -
@Grumm agree, but that would be the kind of work that _should_ be done in TypeScript.
I wrote a small script with 1 function invoked onclick to prove that some kind of custom code actually works in a WebFlow project. Maybe that kind of environment had made me write code like it's 2001 in the first place (even avoiding arrow functions, being too lazy to visit caniuse.com) -
Grumm18233y@fraktalisman It depends on the amount of code.
For a simple website, I would go with javascript.
Compiling typescript is not always a good thing imo. -
"let" is about scoping, not typing. Not sure why you'd avoid it - on the occasions I do have to work with JS, I'll take any language feature I can to make it the slightest bit more sane to work with.
-
When i know that I don't need scoping stuff i write "var", you can't just forget about that keyword
JavaScript still doesn't have proper types, but eslint insists that I should use let and const instead of var. Thanks for the hint, but when I care to code properly, I will use TypeScript, otherwise I don't care.
Wish the warnings in my editor would be more helpful with less noise by default, without taking time and effort to tune their settings.
rant
javascript
eslint
linter