About 3,070,000 results
Open links in new tab
  1. What is void and when to use void type in JavaScript

    Dec 31, 2021 · In this article, we will know what is void operator in Javascript, along with discussing the particular condition where void operator can be used & understanding their implementation through the examples.

  2. void operator - JavaScript | MDN - MDN Web Docs

    4 days ago · When a browser follows a javascript: URI, it evaluates the code in the URI and then replaces the contents of the page with the returned value, unless the returned value is undefined. The void operator can be used to return undefined. …

  3. JavaScript Data Types - W3Schools

    When adding a number and a string, JavaScript will treat the number as a string. JavaScript evaluates expressions from left to right. Different sequences can produce different results: In the first example, JavaScript treats 16 and 4 as numbers, until it reaches "Volvo".

  4. The difference between public void and public String/int/boolean

    This method expects a return value of the type String. If you chose the return type of boolean, it expects boolean and so on. The type void is saying that no return value is expected. Often you will alter the value of a variable or print something out …

  5. Public class fields - JavaScript | MDN - MDN Web Docs

    Jan 20, 2025 · This page introduces public instance fields in detail. For public static fields, see static. For private fields, see private properties. For public methods, see method definitions. For public accessors, see getter and setter. Public instance fields exist on …

  6. Javascript OOP public and private variable scope

    Jul 20, 2015 · I've got a question regarding public and private variables in a Javascript object. Here's the simple code I've been playing with to get my head around variable scope as well as private and public properties.

  7. javascript void functions - Stack Overflow

    void(): This operator allows inserting expressions that produce side effects into places where an expression that evaluates to undefined is desired. The void operator is often used merely to obtain the undefined primitive value, usually using "void(0)" (which is equivalent to "void 0"). In these cases, the global variable undefined can be used ...

  8. javascript - What's a good use of void () - Stack Overflow

    Oct 21, 2012 · void is an operator that is used to return a undefined value so the browser will not be able to load a new page. An important thing to note about the void operator is that it requires a value and cannot be used by itself. Example:- <a href="javascript: void(0)">I am a link</a>

  9. Javascript Void Usage Examples -- EndMemo

    Javascript void is an operator for return a null value, especially useful in the hyperlinks to avoid loading new pages. Here is a typical hyperlink: <a href="http://www.endmemo.com">Home</a>

  10. JavaScript Strings - W3Schools

    Complete JavaScript String Reference. The reference contains descriptions and examples of all string properties and methods.

  11. Some results have been removed