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 destroyer(arr) { | |
// Remove all the values | |
//console.log(arguments[1]); | |
//console.log(arguments[2]); | |
var newArr = []; | |
for(var i = 1; i < arguments.length; i++){ | |
newArr.push(arguments[i]); | |
} | |
console.log(newArr); |
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 truncateString(str, num) { | |
// Clear out that junk in your trunk | |
var newString = ""; | |
if(num <= 3){ | |
newString = str.slice(0, num) + "..."; | |
} | |
else{ | |
newString = str.slice(0, num) + "..."; | |
if(newString.length > num){ |