https://www.youtube.com/watch?v=TMuno5RZNeE
Encapsulation ?
- OO weaken encapsulation by introducing
private,public,protected
Inheritance ?
- why Java doesn't have inheritance ? Diamond problem
Polymorphism
https://www.youtube.com/watch?v=TMuno5RZNeE
Encapsulation ?
private, public, protectedInheritance ?
Polymorphism
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentelem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeightelem.getClientRects(), elem.getBoundingClientRect()| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |