In this issue, I walk you through Type Narrowing, what it is and techniques we can use to do Type narrowing.
Hello, Maina
How are you?
Thanks for the article. I've appreciated read it. I have a doubt though.
The "square" function have a bug for the value 0 (zero). So the "if" will catch it, even if its type is "number" and throw an error.
Best regards :)
Hello, Maina
How are you?
Thanks for the article. I've appreciated read it. I have a doubt though.
The "square" function have a bug for the value 0 (zero). So the "if" will catch it, even if its type is "number" and throw an error.
Best regards :)