javaScript Tips

EXAMPLE OF PROMISE.ALL()

Example of Promise.all() Do you need to iterate over an array of promises? Promise.all() is often the best way. Promise.all(iterable) returns a single promise. Promise.all(iterable) only resolves after every promise in an array of promises has completed resolving. Since the elements of the array are promises, they do not resolve in any particular order. If… Read more EXAMPLE OF PROMISE.ALL()

Inject jQuery into a Webpage Through Chrome Javascript Console

include these lines of jQuery instantiation code in the javascript console Exploring the DOM is much easier with jQuery. However, You may be working with a webpage that does not natively have jQuery installed. That’s ok, the following lines of code will solve this. Just include these lines of jQuery instantiation code before you explore… Read more Inject jQuery into a Webpage Through Chrome Javascript Console

Dynamically Change the onClick, onChange (or other) Value of an Element

If you are implementing AJAX, you will likely run into the need to change the functionality of a button dynamically. There is not a whole lot out there on how to quickly accomplish this so here is a simple explanation. Typically, you have an element such as an “input”, “a” or “select (options)” that has… Read more Dynamically Change the onClick, onChange (or other) Value of an Element