2.8. ExercisesΒΆ
-
Translate the following into Javascript:
def sumlist(l): total = 0 for num in l: total = total + num return total
-
Write a function that accepts an array of numbers and returns the largest number in the array.
-
Write a function that constructs an Array containing the first 10 prime numbers
-
Write a function that removes all occurrences of a given letter from a string. The first parameter should be the letter and the second parameter the string.
-
Write a function that takes a string as a parameter and returns the reversed string
-
Write a function that takes an integer as an argument and returns the number of digits in the integer.
-
Write a function that recognizes palindromes. The function takes a string as a parameter and returns true if the string is a palindrome and false if it is not
You have attempted of activities on this page