#Requesting feedback on beginner HTML/CSS/JavaScript project I made
20 messages · Page 1 of 1 (latest)
wdym by multiple lines?
why not just
const dollarValueInputElems = ...;
const convertBtn = ...;
const clearBtn = ...;
Might improve readability a bit
oh okay, I thought doing it like that was the better way
ty!
may I ask what the difference is? because I've seen some people do it this way
There's no difference
It might even be parsed to the same code, I just find that approach more readable, don't think there's a right answer though
oh cool
well I've changed it to what you recommended, ty for the input
I don't think idiomatic code is as big of a thing in JavaScript as it is in Python or Rust tbh
how are JavaScript and Python/Rust different in terms of that?
Rust has one standard formatting tool pretty much everyone uses
And in Python there's the "Zen of Python" which describes how Python code should be written
is it this thing?: https://github.com/rust-lang/rustfmt
Yeah basically
Rust also enforces some stuff via language design, you can do it in a "non-Rusty" way but that will look ugly to almost everyone
it's interesting
so JavaScript isn't as 'strict'?