v1
- by crazywolf 3/29/202100
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
const numbers = new Array(100).fill(1);

function calculateValues(extra, currentValue) {
	return extra + currentValue;
}

function calculateWithThis(currentValue) {
	return calculateValues(this, currentValue)
}

function curry(value1) {
	return function(value2) {
		return calculateValues(value1, value2);
	}
}
delete caserun single casemove downdrag and drop case


ready



const someOutterContextValue = 5;
numbers.map(calculateValues.bind(null, someOutterContextValue));
delete caserun single casemove upmove downdrag and drop case


ready



const someOutterContextValue = 5;
numbers.map((currentValue) => calculateValues(someOutterContextValue, currentValue));
delete caserun single casemove upmove downdrag and drop case


ready



const someOutterContextValue = 5;
numbers.map(function (currentValue) { return calculateValues(someOutterContextValue, currentValue) });
delete caserun single casemove upmove downdrag and drop case


ready



const someOutterContextValue = 5;
numbers.map(calculateWithThis, someOutterContextValue);
delete caserun single casemove updrag and drop case


ready



const someOutterContextValue = 5;
numbers.map(curry(someOutterContextValue));


Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN