This randomising function is like a coin toss, it gives a numerical result and displays it:

function Ran() {
var c = Math.random();
return (c < 0.5) ? [0, show0()] : 1, show1()];

I want to extract the numerical outcome, 0 or 1, from this and from two other similar functions, sum them, and then run more functions based on the possible sums.

What is the syntax for getting to the numbers? something like

var n = Ran().[0] ?