Re:A small guide for naming stuff in front-end code
by joppy on Thursday January 13, 2022 @08:04AM
(#29920316)
Great post!
Your code example for isHot() seems round the wrong way; also doing something like “return temperature > 100” is probably more idiomatic than using if/else just to return true/false.
Re:A small guide for naming stuff in front-end code
by paceaux on Thursday January 13, 2022 @08:24AM
(#29920464)
Thanks. That's one of those where I have probably 100 cases in code I've written over the years and I can't find a single one when I actually needed it. I'm open to better examples.
Your code example for isHot() seems round the wrong way; also doing something like “return temperature > 100” is probably more idiomatic than using if/else just to return true/false.