-
Carefully read all the instructions and problems before beginning your work.
-
Clone this repository to your local projects directory.
-
Write your solutions to the problems presented below inside
solutions.js.
-
A farmer is asking you to tell him how many legs can be counted among all his animals. The farmer breeds three species:
chickens = 2 legs
cows = 4 legs
pigs = 4 legs
The farmer has counted his animals, and he gives you a subtotal for each species. You have to implement a function named
animalthat returns the total number of legs of all the animals. -
Define a function named
findPerimeterthat takes in length and width and finds the perimeter of a rectangle. -
Define a function named
concatName. Given two strings, firstName and lastName, return a single string in the format "last, first". -
Write a function named
triAreathat takes in 2 inputs, the base and height of a triangle and return its area. -
Define a function named
lessThan100. Given two numbers, return true if the sum of both numbers is less than 100. Otherwise return false. -
Write a function named
makesTenthat takes two inputs. Both arguments are integers, a and b. Return true if one of them is 10 or if their sum is 10. -
You are counting points for a basketball game, given the amount of 2-pointers scored and 3-pointers scored, create a function named
pointsthat will find the final points for the team and return that value. -
Define a function named
Convertthat takes in minutes as an input and will converts those minutes into seconds. -
Write a function named
remainedthat takes two numbers as inputs. The first parameter divided by the second parameter will have a remainder, possibly zero. Return that value. -
Write a function named
getFisrtValuethat takes an array containing only numbers and return the first element.