This file contains 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
// Render JavaScript template (from http://git.io/B7KxZg DoAT Touchy) | |
// | |
// You can place your template in a script tag with type other than "text/javascript" | |
// such as "text/html", like this: | |
// <script type="text/html" id="item-template"> | |
// <li id="{{id}}"> | |
// <p>{{content}}</p> | |
// </li> | |
// You'd then render your template like this: | |
// var itemTemplate = document.getElementById('item-template').innerHTML; |
This file contains 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
var reverseString = function ( subj ) { | |
var helper = subj.split (''), | |
i = 0, k = helper.length, len = helper.length / 2, | |
swap | |
for ( ; i < len; i += 1, k -= 1 ) { | |
swap = helper[ k ]; | |
helper[ k ] = helper[ i ]; | |
helper[ i ] = swap; | |
} |
NewerOlder