Skip to content

Instantly share code, notes, and snippets.

View rambkk's full-sized avatar
👻
looking for impossible task

rambkk

👻
looking for impossible task
View GitHub Profile
@rambkk
rambkk / PHP-array_reduce,findIndex,findIndexes.php
Last active November 11, 2021 09:29
PHP array_reduce, findIndex, and findIndexes functions
<?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
@rambkk
rambkk / replaceHole.js
Last active November 6, 2021 08:01
Javascript holes in array - iterate array with holes, replaceing holes in array, creating holes, and deleting holes in array
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