JAVA SCRIPT
JAVA SCRIPT
3. Write a program that takes two numbers and displays their sum,
difference, product, and quotient.
8. Write a program that takes a number and calculates the sum of all
numbers from 1 to that number.
9. Write a program that takes a string and prints out the number of
vowels in the string.
10. Write a function that takes two arrays of integers as arguments
and returns an array of the common elements in both arrays,
without any duplicates. The returned array should be sorted in
ascending order.
For example, given the arrays [1, 2, 3, 4, 5] and [3, 4, 5, 6, 7], the
function should return [3, 4, 5].
Hint: You may need to use nested loops and conditional statements
to solve this problem.
10. Write a function that takes an array of objects and returns the
object with the highest value for a specified property name.