Skip to content

Instantly share code, notes, and snippets.

Avatar
👻
looking for impossible task

rambkk

👻
looking for impossible task
View GitHub Profile
@rambkk
rambkk / replaceHole.js
Last active Nov 6, 2021
Javascript holes in array - iterate array with holes, replaceing holes in array, creating holes, and deleting holes in array
View replaceHole.js
Javascript-hole-in-array
Javascript holes in array or array with holes, how to iterate, detect, replace, and delete
['a',,'c'] is NOT SAME as ['a',undefined,'c']
For better view please check:
https://github.com/rambkk/Javascript-hole-in-array
github rambkk - pluslab.net - looking for impossible projects
@rambkk
rambkk / PHP-array_reduce,findIndex,findIndexes.php
Last active Nov 11, 2021
PHP array_reduce, findIndex, and findIndexes functions
View PHP-array_reduce,findIndex,findIndexes.php
<?php
/*
* PHP array_reduce_key (v0.11) - array_reduce with additional parameters
* array_reduce with key,
* (javascript like reduce method)
* (if initial value of carry is not specified, null is used)
*
* PHP array_reduce_JS (v0.12) - array_reduce with additional parameters
* (javascript like reduce method)
* if initial value of carry is not specified, first item of input ARRAY is used, and CALLBACK starts on the second item