// Example countLetters("hello") // returns 1 // Exercise 2 // ---------------------------------------------------------------- // Write a function that takes 2 arguments, both integers. // It returns an array containing those numbers with all the integers between them. // For this exercise you can assume that the first integer is strictly less than the second integer. const countNumbers = (start, end) => { // your code here... } // Exercise 3 // ---------------------------------------------------------------- // Write a function that takes 1 argument, a string. // It returns true if the string is a palindrome (the same forwards and backwards). // It returns false if the string is not a palindrome. const isPalindrome = (string) => { // your code here... }
// Example
countLetters("hello") // returns 1
// Exercise 2
// ----------------------------------------------------------------
// Write a function that takes 2 arguments, both integers.
// It returns an array containing those numbers with all the integers between them.
// For this exercise you can assume that the first integer is strictly less than the second integer.
const countNumbers = (start, end) => {
// your code here...
}
// Exercise 3
// ----------------------------------------------------------------
// Write a function that takes 1 argument, a string.
// It returns true if the string is a palindrome (the same forwards and backwards).
// It returns false if the string is not a palindrome.
const isPalindrome = (string) => {
// your code here...
}
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images