About 132,000 results
Open links in new tab
  1. Quickest way to get .domain.com in JavaScript - Stack Overflow

    The question asked "what is the quickest way", so this is the quickest way because it uses the least lines of code and does not add the overhead of the context switch that JavaScript has for functions, or a for loop: var domain = window.location.hostname; var parts = domain.split('.'); var isIpAddress; // Decide whether host is IP address isIpAddress …

  2. javascript - Quickest way to sort an array based on another array ...

    Aug 2, 2021 · Below are my two arrays, what is the quickest way to sort one array based on another. var MainArray = [{ guid: '24c2b868-8f4d-4113-a537-f8e7f57bb88b', info: 'photo 1' }, { guid: '27e910cf-ba4c-

  3. javascript - Quickest way to convert from CSV to object array

    Aug 31, 2013 · Your current method is actually the second fastest, but the quickest way to do this seems to be using regular expressions. I must say that I am quite surprised that the simple parser isin't the fastest solution.

  4. Quickest way to load data in JavaScript array from external source ...

    Aug 6, 2021 · The quickest way is to not load the data at all. If you have any data telling you about how often some zip codes will be used vs others, use that to load the frequently used zip codes first. Then (or instead, if you lack the data) divide the remainder into separate files based on the first, say, three digits, and load the appropriate file only after the user has typed enough digits.

  5. JavaScript - quickest way to extract document meta fields

    Jun 19, 2012 · To replace that namedItem, you can try accessing element right off of a NodeList. IIRC, most modern browsers (?) still support such element resolution (from the DOM0 days) - document.getElementsByTagName('meta')['description']. I wouldn't recommend using this shorthand though. Safer to just enumerate over elements checking for name property or use some kind of abstraction (such as selector ...

  6. javascript - Quickest way to render a Uint8Array to a Canvas

    Oct 24, 2016 · What is the quickest way to render this raw bitmap information back to a canvas? I have been using a 2D rendering context to manually loop though the array and set pixel information, but this is incredibly slow:

  7. javascript - Quickest way to check which property inside an object ...

    Sep 19, 2016 · @Fadhly Permata It's basically done to convert the falsy or truthy values to their Boolean equivalents. "undefined" or "" or 0 (number) are falsy values in JS and if done like !0 (single negate) becomes true. So double negate or double-bang (!!) puts it to it's Boolean state !!0 is false. Accordingly !!"" (double negated empty string) is …

  8. What's the fastest way to loop through an array in JavaScript?

    Mar 18, 2011 · There is another super performant way using the for loop in some cases... for example to copy/clone an array

  9. What's the quickest way to rename all property names in a …

    Feb 28, 2019 · Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! But avoid … Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great ...

  10. Best way to build native applications with JavaScript?

    What is the best (your favorite) framework to develop native mobile applications with web client side (HTML / JavaScript / CSS)? How easy is to build and maintain those applications in multiplatforms (iOS / Android / BlackBerry) parallel?

Refresh