function main(greeting, language) { output = `${greeting}, ${language}!`; console.log(output); return output; }
function main(){var greeting = "Hello";var language = "JS";console.log(`${greeting}, ${language}!`);- function main(greeting, language) {
- output = `${greeting}, ${language}!`;
- console.log(output);
- return output;
- }
Test.assertEquals("Bonjour, JS!", main("Bonjour", "JS")); Test.assertEquals("Hello, JavaScript!", main("Hello", "JavaScript"));
main()Test.assertSimilar(rec, "Hello, JS!", "oops~~ ")- Test.assertEquals("Bonjour, JS!", main("Bonjour", "JS"));
- Test.assertEquals("Hello, JavaScript!", main("Hello", "JavaScript"));