How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
10 plus years* active enterprise development experience and a Fine art degree 🎨
Everything else looks fine but the nested turn ops.. not for me, clarity can go a long way over terse for the sake of others. Besides there are alternatives to nested conditionals. Boolean array .every or .some spring to mind.
// similar to x && yconstcriteria=[user==='logged-in',hasCardDetails]if(criteria.every(isTrue=>isTrue)){// do a thing if all are true}
// similar to x || yconstcriteria=[user==='logged-in',hasCardDetails]if(criteria.some(isTrue=>isTrue)){// do a thing if some are true}
How’s it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK 🇬🇧
Education
10 plus years* active enterprise development experience and a Fine art degree 🎨
Your most welcome 😄, this is functional programming at it's finest. The only thing I don't like is the need to return the result by lambda. I haven't tried it but perhaps the Boolean constructor could sit where isTrue => isTrue is currently? I am afk so can't test.
I haven't tried it but perhaps the Boolean constructor could sit where isTrue => isTrue is currently?
This sentence went "swoosh" over my head.
I also had to google what a lambda was - had never heard that name for an anonymous function before (but I'm an autodidact which could explain it..) 😂
Could you elaborate in an ELI5 way? :D
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Everything else looks fine but the nested turn ops.. not for me, clarity can go a long way over terse for the sake of others. Besides there are alternatives to nested conditionals. Boolean array .every or .some spring to mind.
Clever! Gonna remember this one
Your most welcome 😄, this is functional programming at it's finest. The only thing I don't like is the need to return the result by lambda. I haven't tried it but perhaps the
Boolean
constructor could sit whereisTrue => isTrue
is currently? I am afk so can't test.This sentence went "swoosh" over my head.
I also had to google what a lambda was - had never heard that name for an anonymous function before (but I'm an autodidact which could explain it..) 😂
Could you elaborate in an ELI5 way? :D