What do you want to save?
Add Code snippet
New code examples
-
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 -
Javascript 2021-11-12 09:36:11
jquery link click scroll
// Select all links with hashes $('a[href*="#"]') // Remove links that don't actually link to anything .not('[href="#"]') .not('[href="#0"]') .click(function(event) { // On-page links if ( location.pathn... Add solution -
Javascript 2021-11-11 04:14:16
rock paper scissors javascript
const tolowerUcFirst = v => v.charAt(0).toUpperCase() + v.slice(1).toLowerCase() const answer = prompt( 'Do you want to play Rock Paper Scissors? Type yes or no!' ) if (answer && ['Y', 'YES'].includes(answer.toUpperCase())) { let board = ... Add solution
Best helpers
Bread
+5
Annu_tiger
+5
Webelo
+5
Des Wilson
+5
Twbrown
+5
Dreeves
+5
Xoxocrow
+5
Arash.amd
+5
Gaussler
+5
Kenny W
+5
Chris Crook
+5
Xzhu
+5
Steven Choi
+5
AndrewBC
+5
Static
+5
C. Starr
+5