- Tab indentation
- Single-quotes
- Semicolon
- Strict mode
- No trailing whitespace
- Multiple variable statements
- Space after keywords and between arguments and operators
- Return early
/* | |
** intersect.js | |
** intersect multiple arrays | |
** Usage: | |
var arr1 = ['hey', 'you', 'guys', 'test', 'there']; | |
var arr2 = ['there', 'you']; | |
var arr3 = ['some', 'there', 'you', 'thrice', 'hey', 'huzzah']; | |
intersect(arr1, arr2, arr3); | |
*/ | |
function intersect() { |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
Everytime I tweet about losing weight and posting images, a lot of people ask questions - so thought I'd write something decent down about what I've done so far and am currently working on.
12 months change:
My diet used to be so so bad, energy drinks, constant sugar intake. Kill that! I also used to order takeaways at least 2-3 times a week, because it was easy and the bigger you get the lazier you get from my experience.
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.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent