Created
November 30, 2022 17:40
-
-
Save appoll/191474a53b0d94f1463a6cea3ec7a56b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Same exercises from lesson 6 e0.js & e1.js | |
// E1. | |
// Write an arrow function that takes as parameters: the userName and the userBirthMonth and prints the following: | |
// "Hello, <userName>. Your birth month is: <birthMonth>" | |
// function helloUser(userName, birthMonth) { | |
console.log("..."); | |
// } | |
// helloUser("Paul", "July"); | |
// helloUser("Fredi", "Mai"); | |
let helloUserArrow = (userName, birthMonth) => { | |
} | |
helloUserArrow("Paul", "July"); | |
// Output: | |
"Hello, Paul. Your birth month is: July"; | |
// E2. | |
// Write an arrow function that builds a song by repeating a word. | |
// The word and the number of times should be passed in as parameters. | |
// singSong("hello", 5); | |
// hellohellohellohellohello | |
let singSong = (word, count) => { | |
} | |
singSong("la", 7); | |
singSong("dum", 10); | |
// E3. Check if a string contains a letter | |
// Write a function that takes two parameters: a string and a number; | |
// The function returns | |
// true if the letter is in the string | |
// false if the letter is NOT in the string | |
// function containsLetter (inputString, letter){ | |
// return ...; | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment