abeVotesYes
, billVotesYes
, and carlVotesYes
, are true if the corresponding person voted "yes". Set value to true only if the majority have voted "yes".
document.write("<td><pre>"+str(testAA[i][nArgs])+"</pre></td>");
<html>
<script>
function majorityVoteYes(abeVotesYes, billVotesYes, carlVotesYes) {
var value;
// ADD CODE UNDER THIS LINE
return value;
}
var testAA = [
[true,true,true,true],
[false,true,true,true],
[true,false,true,true],
[true,true,false,true],
[true,false,false,false],
[false,true,false,false],
[false,false,true,false],
[false,false,false,false]
];
function cloneTree(obj) {
if (obj === null)
return null;
if (typeof obj !== "object")
return obj;
var newobj = {};
for (var prop in obj) {
newobj[prop] = cloneTree(obj[prop]);
}
return newobj;
}
var argAAS = [];
for (var i=0;i<testAA.length;i++) {
argAAS.push( [] );