Modification solution jajascript recursivite