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
11 plus years* active enterprise development experience and a Fine art degree 🎨
Graduated in Digital Media M.Sc. now developing the next generation of educational software. Since a while I develop full stack in Javascript using Meteor. Love fitness and Muay Thai after work.
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
11 plus years* active enterprise development experience and a Fine art degree 🎨
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
11 plus years* active enterprise development experience and a Fine art degree 🎨
Your random hex function has a number of problems. For starters, it will never return #ffffff. Also there are many other values it will never return as you're using padEnd instead of padStart
seen 1000 times and wrong 1000 times...
You should then post the right one :
You too ....
You made a critique without even trying to help. That was my point.
If you have knowledge, you should share it.
Thanks Luke for taking the time to add a fool proof version.
this has been chewed through here so many times, a simple search is enough... dev.to/ianfelix/how-to-invert-a-st...
You could also hard code the string backwards 😉
That's the efficiency of build time.
Nice one Luke
Luke you should make this comment a new article do we can bookmark it 🙃
Oh man an article on hard coding strings where could that lead 🤪
at least it does not lead to a configuration or environment variable called
empty_string.I don't know what that is 👍
Clear all cookies is more of a tiny program than a one-liner ;)
To capitalise a string you could use the same technique as to reverse a string.
I find it easier to read / understand than two
replace.Hope this helps.
you have to understand the task...
Ha, my bad! I read too quickly.
I guess I should not be reading code on my phone at 11pm. 😓
Your random hex function has a number of problems. For starters, it will never return
#ffffff. Also there are many other values it will never return as you're usingpadEndinstead ofpadStartI personally use this to capitalize:
str[0].toUpperCase() + str.substr(1)
How about adding another one liner
To remove duplicate values