v1
- by rob-3 3/31/202300
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
class Hello1 {
	constructor(a, b) {
		this.a = a;
		this.b = b;
	}
	sayHello() {
		return this.a + this.b;
	}
}

class Hello2 {
	constructor(a, b) {
		this.a = a;
		this.b = b;
	}
	sayHello = () => {
		return this.a + this.b;
	}
}

const Hello3 = (a, b) => ({
	a,
	b,
	sayHello() {
		return this.a + this.b;
	},
});

function sayHello() {
	return this.a + this.b;
}
const Hello4 = (a, b) => ({
	a,
	b,
	sayHello,
});

function Hello5(a, b) {
	this.a = a;
	this.b = b;
	this.sayHello = function() {
		return this.a + this.b;
	};
}

function Hello6(a, b) {
	this.a = a;
	this.b = b;
}

Hello6.prototype.sayHello = function() {
	return this.a + this.b;
};

function sayHello2(self) {
	return self.a + self.b;
}
const Hello7 = (a, b) => ({
	a,
	b,
});
delete caserun single casemove downdrag and drop case


ready



for (let i = 0; i < 100000; i++) {
	const hello = new Hello1(1, 2);
	hello.sayHello();
}
delete caserun single casemove upmove downdrag and drop case


ready



for (let i = 0; i < 100000; i++) {
	const hello = new Hello2(1, 2);
	hello.sayHello();
}
delete caserun single casemove upmove downdrag and drop case


ready



for (let i = 0; i < 100000; i++) {
	const hello = Hello3(1, 2);
	hello.sayHello();
}
delete caserun single casemove upmove downdrag and drop case


ready



for (let i = 0; i < 100000; i++) {
	const hello = Hello4(1, 2);
	hello.sayHello();
}
delete caserun single casemove upmove downdrag and drop case


ready



for (let i = 0; i < 100000; i++) {
	const hello = new Hello5(1, 2);
	hello.sayHello();
}
delete caserun single casemove upmove downdrag and drop case


ready



for (let i = 0; i < 100000; i++) {
	const hello = new Hello6(1, 2);
	hello.sayHello();
}
delete caserun single casemove updrag and drop case


ready



for (let i = 0; i < 100000; i++) {
	const hello = Hello7(1, 2);
	sayHello2(hello);
}
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