What do you want to save?
Add Code snippet
New code examples
-
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 -
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