About 4,650,000 results
Open links in new tab
  1. What does the !! (double exclamation mark) operator do in …

    Novice JavaScript developers need to know that the "not not" operator is using implicitly the original loose comparison method instead of the exact === or !== operators and also the hidden cast operation that is happening behind the scenes and I show it in the example I provide.

  2. Is there a "null coalescing" operator in JavaScript?

    Jan 25, 2009 · JavaScript now supports the nullish coalescing operator (??). It returns its right-hand-side operand when its left-hand-side operand is null or undefined, and otherwise returns its left-hand-side operand.

  3. What's the difference between & and && in JavaScript?

    This operator is almost never used in JavaScript. Other programming languages (like C and Java) use it for performance reasons or to work with binary data. In JavaScript, it has questionable performance, and we rarely work with binary data. This operator expects two numbers and returns a number. In case they are not numbers, they are cast to ...

  4. javascript - What does [object Object] mean? - Stack Overflow

    In JavaScript there are 7 primitive types: undefined, null, boolean, string, number, bigint and symbol. Everything else is an object. The primitive types boolean, string and number can be wrapped by their object counterparts. These objects are instances of the Boolean, String and Number constructors respectively.

  5. operators - javascript i++ vs ++i - Stack Overflow

    Jul 7, 2016 · In javascript I have seen i++ used in many cases, and I understand that it adds one to the preceding value:

  6. javascript - Where should I put <script> tags in HTML markup?

    When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the &lt...

  7. Javascript, viewing [object HTMLInputElement] - Stack Overflow

    Mar 13, 2013 · I'm just started to learn HTML. Doing an alert() on one of my variables gives me this result [object HTMLInputElement]. How to get the data, that were added in text field, where my input type is ...

  8. What is the correct way to check for string equality in JavaScript ...

    Aug 27, 2010 · What is the correct way to check for string equality in JavaScript? Asked 15 years ago Modified 3 years, 1 month ago Viewed 1.8m times

  9. How to remove all event listeners of a DOM object in JavaScript?

    How to remove all event listeners of a DOM object in JavaScript? Asked 14 years, 9 months ago Modified 8 days ago Viewed 239k times

  10. How can I declare optional function parameters in JavaScript?

    Oct 9, 2012 · Can I declare default parameter like function myFunc( a, b=0) { // b is my optional parameter } in JavaScript?