v2
1/4/2021 by axelpale -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
var lib = {
	bar: (a) => a,
	baz: (b) => Math.pow(b, 4),
	foo: (v) => 4 * v + 5,
}
delete caserun single casemove downdrag and drop case


ready



try {
	lib['foo'](Math.sin(45) + Math.cos(23))
} catch (e) {
	console.log(e)
}
delete caserun single casemove upmove downdrag and drop case


ready



if ('foo' in lib) {
	lib['foo'](Math.sin(45) + Math.cos(23))
} else {
	console.log('error')
}
delete caserun single casemove upmove downdrag and drop case


ready



if (typeof lib['foo'] === 'function') {
	lib['foo'](Math.sin(45) + Math.cos(23))
} else {
	console.log('error')
}
delete caserun single casemove updrag and drop case


ready



if (Object.prototype.hasOwnProperty.call(lib, 'foo')) {
	lib['foo'](Math.sin(45) + Math.cos(23))
} else {
	console.log('error')
}
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