DEV Community

Discussion on: How to make e commerce website with HTML, CSS and JS part 2

mcwolfmm profile image

and a little more criticism :) nowhere do you handle callback errors. this is a very bad practice.
be sure to check for an error first and only then continue processing the task. also, you can add another class of messages (besides alert) for example error to return in case of error

kunaal438 profile image
Modern Web Author

Thanks to pointing out the mistakes I'll make sure to handle error first.☺️

Some comments have been hidden by the post's author - find out more