JSFiddle - React, Tailwind, and code Playground
by Tim Morgan
HTML
<div id="exp1" class="exp1">
<h1>Something</h1>
</div>
CSS
h1 {
font-size:15px;
color:#00f;
text-decoration: underline;
-webkit-transition-duration: 0.2s;
}
JavaScript
// Fill in the code so multiply takes an array of numbers and returns multiplying them all together
function multiply(arr) {
var result = 1;
for (var i = 0; i < arr.length; i++) {
result = result * arr[i];
}
return result;
}
function mulTwoByFour(){
return multiply([2,4]);
}
alert(mulTwoByFour());
console.log(multiply([1, 2, 3, 4, 5, 6]));
console.log(multiply([1,2]));
console.log(multiply([+(prompt("enter a")), +(prompt("enter b"))]));