Ephera

joined 5 years ago
[–] Ephera@lemmy.ml 7 points 20 hours ago

That's terrifying, especially in JS where no type system will fuck you up for returning nothing when you should've returned a boolean.

[–] Ephera@lemmy.ml 2 points 20 hours ago

Hmm, a webdev colleague said he'd normally prefer without semicolons, but used them anyways for better compile errors.

[–] Ephera@lemmy.ml 1 points 2 months ago

For optimal performance, you should rewrite it in Rust:

inline_python::python! {
    print(js2py.eval_js("(number) => number % 2 ? 'odd' : 'even'")(number))
};