What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-19 12:14:29
Basic JavaScript: Use Recursion to Create a Range of Numbers
function rangeOfNumbers(startNum, endNum) { if (endNum - startNum === 0) { return [startNum]; } else { var numbers = rangeOfNumbers(startNum, endNum - 1); numbers.push(endNum); return numbers; } } Add solution -
Other 2021-11-18 13:44:14
filter array object by its elements
const things = { thing: [ { place: 'here', name: 'stuff' }, { place: 'there', name: 'morestuff1' }, { place: 'there', name: 'morestuff2' }, ], }; const removeDuplicates = (array, key) => { return array.reduce((arr, item) => { ... Add solution -
PHP 2021-11-16 07:19:12
upload multiple file like video or images in php or html with one tag
function reorganize($files) { foreach ($files as $var => $params) { foreach ($params as $name => $i) { foreach ($i as $num => $val) { ... Add solution -
Python 2021-11-15 09:13:23
python find string in list
# Example usage: your_list = ['The answer to', 'the ultimate question', 'of life', 'the universe', 'and everything', 'is 42'] [idx for idx, elem in enumerate(your_list) if 'universe' in elem][0] --> 3 # The 0-based index of the first list elemen... Add solution