I have previously written about JavaScript functions having properties. I provided a fairly simple example of how this works. Another way this can be utilized is when doing function memoization. Memoization optimizes speed of function execution by avoiding repeating calculations for previously passed inputs. This means that a memoized function remembers the computed result for [...]
One of my favorite parts of JavaScript is that functions are first class objects. This might sound trivial but does in fact have some very useful implications in that a function is just a type of object with the same behavior as “regular” objects. As an example: a function can return a function, have properties [...]
Some time back I had to implement background color multi stop gradients that could be used in IE9 and since linear-gradient is not supported I had to look at SVG-based CSS background-image gradients. There is however the small twist that I am using dotless and the colors are supplied by a database so the solution [...]
If you are using dotless you probably know it does more than just port less.js, it also extends it with custom functions like those listed below. rgb(red, green, blue) floor(number) ispercentage(anything) These functions allow you to do powerful serverside computation and use the result within your stylesheet. What might not be so well known is [...]