What do you think the following code does?
function fn(msg, time) {
setTimeout(function() {
console.log(msg);
}, time);
}
fn('it works', 1000);What do you think the following code does?
function fn(msg, time) {
setTimeout(function() {
console.log(msg);
}, time);
}
fn('it works', 1000);| /** | |
| * Masking an image with a gradient (answer to question) | |
| */ | |
| div { | |
| width: 200px; height: 200px; | |
| background: linear-gradient(white, hsla(0,0%,100%,0)), | |
| url(http://placekitten.com/200/200); | |
| } |
| YUI.add('node-scroll-info', function (Y) { | |
| /** | |
| Provides the ScrollInfo Node plugin, which exposes convenient events and methods | |
| related to scrolling. | |
| @module node-scroll-info | |
| **/ | |
| /** |
| #!/usr/bin/ruby | |
| require 'time' | |
| def format_time(seconds) | |
| hours = (seconds / 3600).to_i | |
| minutes = ((seconds % 3600) / 60).to_i | |
| seconds = (seconds % 60).to_i | |
| minutes = "0#{minutes}" if minutes < 10 | |
| seconds = "0#{seconds}" if seconds < 10 |
| /** | |
| * CSS Box model demo | |
| */ | |
| body { | |
| width: 300px; | |
| height: 200px; | |
| padding: 30px; | |
| border-width: 10px; | |
| /*box-sizing: border-box;*/ |
| /** | |
| * Multi-level dropdown menus | |
| */ | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } |
| /** | |
| * Challenge by HTeuMeuLeu | |
| */ | |
| body { | |
| padding:50px; | |
| background:#2fa7ca; | |
| } |
| // Apply any css property/value pair. | |
| @mixin css( | |
| $azimuth: null, | |
| $background: null, | |
| $background-attachment: null, | |
| $background-color: null, | |
| $background-image: null, | |
| $background-position: null, | |
| $background-repeat: null, | |
| $border: null, |
| /** | |
| * box-shadow vs filter: drop-shadow 2 | |
| */ | |
| body { | |
| background: #ddd; | |
| font: 16px/1 sans-serif; | |
| margin: 50px; | |
| } |