Hey there Fellow Javascript Coder!
Whether you're a experienced programmer or just someone who just started with javascript basics, this list of ha...
For further actions, you may consider blocking this person and/or reporting abuse
very much agree on the whole array part! unnoticed mutations can be such a pain in the ass!
Reminds me of GIGO - Garbage In Garbage Out đ
Hi Ren, An alternative to
if(variable) console.log("True");
can be found as a method in the Console API., although the logic needs to be inverted.console.assert
expects at least two parameters; a Boolean assertion and a message (or any other data) you want to present.So the alternative to the above code is
console.assert(!variable, "True")
. It is typically used to flag up when something went wrong but I have never seen it used in production code.You probably didnt see it in production code because many people know what assert does, including me! I just use console.log during testing and remove them when their logging work for testing is over
Thanks, it was a good read, bookmarked, and followed!
if (obj.property)
does not equalif (property in obj)
whenobj.property
is falsy. And I really thinkarr.length
should be considered immutable. Good point though!Thanks for the information! Will try to keep the next blog better!
That was a nice read! Liked, bookmarked and followed, keep the good work! đ
Thanks đ you can even star my current project github.com/rovelstars/reejs for support đ
No offense, but I don't think these codes are going to be useful
No problem! I will try my best to write better blogs!
Good Work đđ