Doing business related stuff in JS is crazy and I always send my data to backend for such things. And before I send it to Payment Gateway, I always calculate again in backend just to make sure as additional layer of security. But just because some dimwits doing such mission critical stuff in JS doesn't mean it is vulnerable. It means HE is stupid. That's what I tried to convey.
I keep coming across the following two misconceptions, on a fairly regular basis!
Arrow functions are bound with their outer context (
This one is a fairly common misconception, especially among the folks who make a ES5 to ES6 jump.
Arrow functions bypass the binding process which makes the outer context (
this) available inside the arrow function.
- JS can do everything. Literally, I have heard people say that. I have seen people write some simple functions which can be easily done in Java, being written in JS which is not only big, but clumsy.
- JS is not secure and vulnerable!
These 3 are most common one's I can recollect!
I was so surprised that I wanted to laugh and bash out at him in front of his colleages. But then it was in college so of course I didn't.
I still cringe when I think about that day. 😂