Rubber Duck Explanation of Assertions in Javascript

My attempt to learn for myself, then explain, what an assertion is at the lowest level.

Let me know if a) this is helpful and/or b) if it makes sense

Hey there,

I think you should break down this article into two articles[two distinct parts] as you briefly introduce what assertion is, but too briefly in my opinion, and then you write about a method how to break down the logic into small pieces.

After reading it, I don’t think I can actually go and use the assertion in JavaScript as I don’t know how to use them. I don’t know it’s syntax. Is that something I should include in my code regularly or…? Why shouldn’t I just use IF statement instead?

What I’ve learnt though is that I should try to break down the logic of my statements to very small parts so I can assert them individually and output a clear error message, avoiding ambiguity.

1 Like

Thank you for the feedback. Those are good ideas.

For me it helped clarify, something even more basic and after I wrote this article, I pretty much zoomed through the first section in the security certification.

I agree that there is no introduction to JavaScript, and I will definitely add another part as I continue to learn for myself.

I definitely find that explaining something helps me learn it better.

I have a question though, do you think this article should be broken into two parts? Or do you think I should write a second part in addition to this? Or a little bit of both?

Thanks for taking the time to respond.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.