A Pen by Jared Williams on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Reverse a string | |
| * | |
| * @param {String} input String to reverse | |
| * @return {String} The reversed string | |
| */ | |
| var reverse = function (input) { | |
| // ... | |
| return output; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Invoking a function and applying it have the same | |
| // result. apply() takes two parameters: the first one is an object to bind to this inside of | |
| // the function, the second is an array or arguments, which then becomes the array-like | |
| // arguments object available inside the function. If the first parameter is null, then this | |
| // points to the global object, which is exactly what happens when you call a function | |
| // that is not a method of a specific object. | |
| // When a function is a method of an object, there’s no null reference passed around. Here the | |
| // object becomes the first argument to apply(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Markdown Cheat Sheet | |
| # H1 tag | |
| ## H2 tag | |
| ### H3 tag | |
| #### H4 tag | |
| ##### H5 tag | |
| ###### H6 tag | |
| *This text will be italic* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function _getUtcTime () { | |
| var | |
| d = date, | |
| i = 0, | |
| arr, | |
| t; | |
| d = d || new Date(); // default to now | |
| arr = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| markdown: { | |
| all: { | |
| files: [ | |
| { | |
| expand: true, | |
| src: ['**/*.md', '!node_modules/**/*.md'], | |
| ext: '.html' | |
| } |
View the source of this content.
Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Roses are red Violets are blue
A simple slider made with AngularJS (unstable-branch) and CSS3
A Pen by Jared Williams on CodePen.