| 
		
			Сообщение от Alexandroppolus
			
		
	 | 
	| 
		но будет мутный говнокод
	 | 
	
увы, бывает 

 и от рекурсии не отказался 
 
<script>
const graph = {
    value: 65,
    children: [{
        value: 15,
        children: [{
            value: 55,
            children: [{
                value: 85,
                children: [{
                    value: 66,
                    children: [{
                        value: 1
                    }, {
                        value: 21
                    }]
                }]
            }, {value: -30}]
        }]
    }, {
        value: -1
    }]
};
const tree = data => {
    let arr = [], cur
    while (data.children && (cur = data.children.pop())) {
        arr = arr.concat(tree(cur))
    }
    return arr.concat(data.value)
}
const arr = tree(graph)
document.write(`Min: ${Math.min(...arr)}, Max: ${Math.max(...arr)}`)
//var tree=function(a){for(var b=[],c;a.children&&(c=a.children.pop());)b=b.concat(tree(c));return b.concat(a.value)};
</script>