Y
Hacker News
new
|
ask
|
show
|
jobs
by
simplify
4010 days ago
For representing `if` statements in JavaScript, what was the reasoning for using a function over a ternary?
1 comments
fredyr
4010 days ago
I changed from the ternary representation to the function, because I didn't think the generated code was very readable. In hindsight I'm not sure it's that much improvement. From a performance view it's probably worse off.
link
zeckalpha
4010 days ago
Rule 1: Do not make assumptions about JavaScript performance.
link