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
function fizzbuzz(a, b) { | |
for (var i = a; i <= b; i++) { | |
if (i % 3 == 0 && i % 5 == 0) { | |
console.log("Fizzbuzz"); | |
} else if (i % 5 == 0) { | |
console.log("Buzz"); | |
} else if (i % 3 == 0) { | |
console.log("Fizz"); | |
} else { | |
console.log(i); |
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
/* ____ _ _ | |
/ ___|___ _ __ ___ _ __ __ _ _ __ | |__ (_) __ _ | |
| | / _ \| '_ ` _ \| '_ \ / _` | '_ \| '_ \| |/ _` | | |
| |__| (_) | | | | | | |_) | (_| | | | | | | | | (_| | | |
\____\___/|_| |_| |_| .__/ \__,_|_| |_|_| |_|_|\__,_| | |
|_| | |
____ _ _ _ _ ____ _ _ | |
/ ___(_) |__ ___ _ __ _ __ ___| |_(_) ___ __ _ / ___|(_)_ __(_)_ _ ___ | |
| | | | '_ \ / _ \ '__| '_ \ / _ \ __| |/ __/ _` | \___ \| | '__| | | | / __| | |
| |___| | |_) | __/ | | | | | __/ |_| | (_| (_| | ___) | | | | | |_| \__ \ |
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
$.fn.tableSort = function (col, order){ | |
function toNumber(number) { | |
return parseFloat(number.replace(/\./g,"").replace(/,/g,".")) | |
} | |
return this.each(function(){ | |
var rows = [].slice.call(this.rows, 0).sort(function(a,b){ | |
if (order === 'desc') b = [a,a=b][0]; // troca-troca | |
var textA = $(a.cells[col]).text() | |
, textB = $(b.cells[col]).text() |