About 1,960,000 results
Open links in new tab
  1. How do I format a date in JavaScript? - Stack Overflow

    How do I format a Javascript Date object as a string? (Preferable format: 10-Aug-2010)

  2. Is it possible to override JavaScript's toString() function to provide ...

    153 When I console.log() an object in my JavaScript program, I just see the output [object Object], which is not very helpful in figuring out what object (or even what type of object) it is. In C# I'm …

  3. javascript - Generate a string of random characters - Stack Overflow

    I want a string of fixed length, composed of characters picked randomly from a set of characters e.g. [a-zA-Z0-9]. How can I do this with JavaScript?

  4. javascript - Converting an object to a string - Stack Overflow

    Apr 10, 2011 · Greate solution! But could u tell me what happens behind the scenes when you simply do this : console.log(o) ? Since if you try to log an object added to a string , it actually …

  5. Casting to string in JavaScript - Stack Overflow

    Jun 18, 2012 · I found three ways to cast a variable to String in JavaScript. I searched for those three options in the jQuery source code, and they are all in use. I would like to know if there …

  6. Get String in YYYYMMDD format from JS date object?

    Jun 18, 2010 · I'm trying to use JS to turn a date object into a string in YYYYMMDD format. Is there an easier way than concatenating Date.getYear(), Date.getMonth(), and Date.getDay()?

  7. javascript - How to convert instance of any type to string? - Stack ...

    I'm implementing a function that receives an argument which it needs to convert to its string representation. If a given object implements a toString() method, then the function should use it.

  8. How to convert decimal to hexadecimal in JavaScript

    Apr 12, 2019 · The JavaScript function toString(16) will return a negative hexadecimal number which is usually not what you want. This function does some crazy addition to make it a …

  9. How can you encode/decode a string to Base64 in JavaScript?

    You can use btoa() and atob() to convert to and from base64 encoding. There appears to be some confusion in the comments regarding what these functions accept/return, so… btoa() …

  10. 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 …