function sayHello(input) { return !input ? "Hello World!" : "Hello " + input + "!" };
- function sayHello(input) {
if (input !== true){return "Hello World!";} else {return "Hello " + input + "!";}- return !input ? "Hello World!" : "Hello " + input + "!"
- };
describe("given we are annonymous", () => { it("should say hello world", () => { Test.assertEquals(sayHello(), "Hello World!"); }); it("should say hello amigo", () => { Test.assertEquals(sayHello("Amigo"), "Hello Amigo!"); }); });
- describe("given we are annonymous", () => {
- it("should say hello world", () => {
- Test.assertEquals(sayHello(), "Hello World!");
- });
- it("should say hello amigo", () => {
- Test.assertEquals(sayHello("Amigo"), "Hello Amigo!");
- });
- });