What do you want to save?
Add Code snippet
New code examples
-
Ruby 2021-11-16 05:21:19
Ruby exclude from slice
# First of all you have to use splat (*) operator. # Then instead of using .slice() and .except() together, you can do this is more efficient way. columns_to_show = ['age', 'gender', 'cast', 'fee_status'] columns_to_show = columns_to_show - hidden_colum... Add solution -
Javascript 2021-11-15 20:03:49
capitlize strung js
With performance metrics... // 10,889,187 operations/sec function capitalizeFirstLetter(string) { return string[0].toUpperCase() + string.slice(1); } // 10,875,535 operations/sec function capitalizeFirstLetter(string) { return string.charAt(0).t... Add solution -
Javascript 2021-11-15 20:03:37
capitlize strung js
With performance metrics... // 10,889,187 operations/sec function capitalizeFirstLetter(string) { return string[0].toUpperCase() + string.slice(1); } // 10,875,535 operations/sec function capitalizeFirstLetter(string) { return string.charAt(0).t... Add solution -
Javascript 2021-11-15 14:06:35
discord.js arguments
//Seperate Arguments let seperateArgs = args[0]; //0 being the first argument //Input "hello world" //Output "hello" //Full Arguments let fullArgs = args.slice(0).join(' '); //Input "hello world" //Output "hello world&q... Add solution -
Javascript 2021-11-15 05:00:18
javascript split array into chuncks of
function splitArrayIntoChunksOfLen(arr, len) { var chunks = [], i = 0, n = arr.length; while (i < n) { chunks.push(arr.slice(i, i += len)); } return chunks; } var alphabet=['a','b','c','d','e','f']; var alphabetPairs=splitArrayIntoC... Add solution