tlystad24
7/26/2017 - 8:58 PM

JS Bin // source https://jsbin.com/xifezuh

JS Bin

// source https://jsbin.com/xifezuh

function printReverse(arr) {
	arr = arr.reverse();
	for (var i = 0; i < arr.length; i++) {
		console.log(arr[i]);
	}
}

printReverse(['A', 'B', 'C']);


function isUniform(arr) {
	var first = arr[0];
	
	for (var i = 1; i < arr.length; i++) {
		if (arr[i] !== first) {
			return false;
		}
	}
	return true;
}

console.log(isUniform(['U', 'U']));

function sumArray(arr){
	//arr = arr.recude(add, 0);
	var total = 0;
	arr.forEach(function(element){
		total += element;
	});
	return total;
}

function roof(arr) {
	var biggest = arr[0]
	for (var i = 1; i < arr.length; i++) {
		if (arr[i] > biggest) {
			biggest = arr[i];
		}
	}
	return biggest;
}
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>

<script id="jsbin-javascript">
function printReverse(arr) {
	arr = arr.reverse();
	for (var i = 0; i < arr.length; i++) {
		console.log(arr[i]);
	}
}

printReverse(['A', 'B', 'C']);


function isUniform(arr) {
	var first = arr[0];
	
	for (var i = 1; i < arr.length; i++) {
		if (arr[i] !== first) {
			return false;
		}
	}
	return true;
}

console.log(isUniform(['U', 'U']));

function sumArray(arr){
	//arr = arr.recude(add, 0);
	var total = 0;
	arr.forEach(function(element){
		total += element;
	});
	return total;
}

function roof(arr) {
	var biggest = arr[0]
	for (var i = 1; i < arr.length; i++) {
		if (arr[i] > biggest) {
			biggest = arr[i];
		}
	}
	return biggest;
}
</script>



<script id="jsbin-source-javascript" type="text/javascript">function printReverse(arr) {
	arr = arr.reverse();
	for (var i = 0; i < arr.length; i++) {
		console.log(arr[i]);
	}
}

printReverse(['A', 'B', 'C']);


function isUniform(arr) {
	var first = arr[0];
	
	for (var i = 1; i < arr.length; i++) {
		if (arr[i] !== first) {
			return false;
		}
	}
	return true;
}

console.log(isUniform(['U', 'U']));

function sumArray(arr){
	//arr = arr.recude(add, 0);
	var total = 0;
	arr.forEach(function(element){
		total += element;
	});
	return total;
}

function roof(arr) {
	var biggest = arr[0]
	for (var i = 1; i < arr.length; i++) {
		if (arr[i] > biggest) {
			biggest = arr[i];
		}
	}
	return biggest;
}</script></body>
</html>