Example found

JS version of solution found