Set value
to true if the array arr
contains a 7, and to false otherwise.
document.write("<td><pre>"+str(testAA[i][nArgs])+"</pre></td>");
<html>
<script>
function hasSeven(arr) {
var value;
// ADD CODE UNDER THIS LINE
return value;
}
var testAA = [
[[1],false],
[[7],true],
[[1,2,3,8],false],
[[200,4,7], true]
];
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( [] );
for (var j=0;j<testAA[i].length-1;j++) {
argAAS[i].push( str(testAA[i][j]) );
}
}