Created
July 6, 2022 04:07
-
-
Save rahulbanerjee26/d4585695249b3d9e88860520d787ec69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const myFunc = (greetings,name) => `${greetings()}, ${name}! `; | |
const hello = () => "Hello" | |
const bonjour = () => "Bonjour" | |
const salut = () => "Salut" | |
const result_1 = myFunc(hello,"Rahul"); | |
const result_2 = myFunc(bonjour,"Rahul"); | |
const result_3 = myFunc(salut,"Rahul"); | |
console.log(result_1); | |
console.log(result_2); | |
console.log(result_3); | |
// Output: | |
// Hello, Rahul! | |
// Bonjour, Rahul! | |
// Salut, Rahul! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment