What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-09 14:31:18
first letter tuUppercase
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-11-07 13:04:17
js subarray
// array.slice(start, end) const FRUITS = ["Banana", "Orange", "Lemon", "Apple", "Mango"]; var citrus = FRUITS.slice(1, 3); // citrus => [ 'Orange', 'Lemon' ] // Negative values slice in the opposite d... Add solution -
Javascript 2021-11-04 04:04:10
hexstring to rgb array js
function rgbToHex(r, g, b) { return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); } function hexToRgb(hex) { var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); if(result){ var... Add solution -
Javascript 2021-10-27 18:29:05
capitalize first carater js
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-10-27 10:12:11
javascript capitalize first letter of each word
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2021-10-26 20:46:14
nodejs restart process
Generally process managers are used to (automatically) restart processes, such as monit, PM2, nodemon, forever, etc. However, you could restart from the process itself by simply spawning a detached child process that waits some period of time and then ex... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5