I’ve learned that “My glass is half-full” means “I think I’m an optimist but since I can’t think of any examples I’ll just use a cliche.” All the half-full glasses on JDate and Match.com made me wonder why so many women were drinking when they filled out their profiles....
A list of funny and tricky JavaScript examples JavaScript is a great language. It has a simple syntax, large ecosystem and, what is most important, a great community. At the same time, we all know that JavaScript is quite a funny language with tricky parts. Some of them can quickly turn...
A list of funny and tricky JavaScript examples JavaScript is a great language. It has a simple syntax, large ecosystem and, what is most important, a great community.At the same time, we all know that JavaScript is quite a funny language with tricky parts. Some of them can quickly turn ...
You've created an array with 4 empty elements. Despite all, you'll get an arrary with three elements, because of trailing commas:let a = [,,,] a.length // -> 3 a.toString() // -> ',,'💡 Explanation:Trailing commas (sometimes called "final commas") can be useful when adding ...
A list of funny and tricky JavaScript examples JavaScript is a great language. It has a simple syntax, large ecosystem and, what is most important, a great community.At the same time, we all know that JavaScript is quite a funny language with tricky parts. Some of them can quickly turn ...
A list of funny and tricky JavaScript examples JavaScript is a great language. It has a simple syntax, large ecosystem and, what is most important, a great community. At the same time, we all know that JavaScript is quite a funny language with tricky parts. Some of them can quickly turn...
A list of funny and tricky JavaScript examples JavaScript is a great language. It has a simple syntax, large ecosystem and, what is most important, a great community.At the same time, we all know that JavaScript is quite a funny language with tricky parts. Some of them can quickly turn ...
You should watch very carefully for the above examples! The behaviour is described in section 7.2.15 Abstract Equality Comparison of the specification.undefined and NumberIf we don't pass any arguments into the Number constructor, we'll get 0. The value undefined is assigned to formal arguments...
A list of funny and tricky JavaScript examples JavaScript is a great language. It has a simple syntax, large ecosystem and, what is most important, a great community.At the same time, we all know that JavaScript is quite a funny language with tricky parts. Some of them can quickly turn ...
A list of funny and tricky JavaScript examples JavaScript is a great language. It has a simple syntax, large ecosystem and, what is most important, a great community.At the same time, we all know that JavaScript is quite a funny language with tricky parts. Some of them can quickly turn ...