lnbrown1869 lnbrown1869
  • 10-01-2024
  • Computers and Technology
contestada

Create a function that returns the smaller number as a string.
Examples:
smallerNum("21", "44") ➞ "21"
smallerNum("1500", "1") ➞ "1"
smallerNum("5", "5") ➞ "5"

smallerNum = (n1,n2) => {
n1 *= 1;
n2 *= 1;
var arr = [n1,n2];
return Math.min(...arr);
}
smallerNum("100", "4");

Respuesta :

Otras preguntas

discuss the uses and economic value of the mineral and estimate the gp
Which of the following statements best explains how the term exercise is different from the term physical activity a. only exercise can qualify as physical act
En qué consiste una molécula
What role do you want to play in your community in 10 years?
in what way did british leaders misunderstood the revolutionary war
$52 for 4 hours of shoveling snow and $71.50 for 5.5 hours of shoveling snow. How long would she have to shovel snow to earn $39
Photosynthesis is important to living organisms because it is the foundation of most food chains. the source of nitrogen gas in the air. how animals get carb
There are 12chairs in the meeting hall and an odd number of tables.each has the same number of chairs.How many tables are there?
How many cubic feet are in 3 cubic yards?
Which organism is a herbivore? A. spider B. bacterium C. grass D. grasshopper