What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-18 23:39:17
copy one array to another javascript
/* Copying arrays or parts of arrays in JavaScript */ var fruit = ["apple", "banana", "fig"]; // Define initial array. console.log(fruit); // ["apple", "banana", "fig"] // Copy an entire array ... Add solution -
TypeScript 2021-11-18 06:11:22
object notation string javascript\
function getValueFromNotation(obj: Object,is: string|any[], value: any = undefined) { if (typeof is == 'string') return getValueFromNotation(obj,is.split('.'), value); else if (is.length==1 && value!==undefined) return obj... Add solution -
Javascript 2021-11-17 16:11:11
javascript capitalize first letter
//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