repl.it
@Vandesm14/

Wiseperson generator drill

JavaScript

No description

fork
loading
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function wisePerson(wiseType, whatToSay) {
	return 'A wise ${wiseType} once said: "${whatToSay}."';
}

/* From here down, you are not expected to 
   understand.... for now :)  
   
   
   Nothing to see here!
   
*/

// tests

function testWisePerson() {
	const wiseType = 'goat';
	const whatToSay = 'hello world';
	const expected = 'A wise ' + wiseType + ' once said: "' + whatToSay + '."';
	const actual = wisePerson(wiseType, whatToSay);
  console.log(expected);
  console.log(actual);
	if (expected === actual) {
		console.log('SUCCESS: `wisePerson` is working');
	} else {
		console.log('FAILURE: `wisePerson` is not working');
	}
}

testWisePerson();
Native Browser JavaScript
?