CSU Functional Program Elements in the Eloquent Javascript Project Write a program in Javascript that exercises the functional higher order functions to co
CSU Functional Program Elements in the Eloquent Javascript Project Write a program in Javascript that exercises the functional higher order functions to compute the perimeter of only the triangles in the list. The program should be composed of the following elements.Embed a list of polygons into your program. The list must have a minimum of 5 polygons, with exactly 2 triangles in the list.Write a function named poly_sum(polygon) that returns the perimeter of the given polygon. So for example the rectangle [2,4,2,4] as input to this function would return 12, which is the sum of the 4 sides. Note that this function must be constructed only using the higher order functional elements outlined in the book. Use reduce to generate a sum of those sides.Use the standard filter function to generate a list of only the triangles in the original polygon list.Use the standard map function to compute the perimeters of the triangles from the previous step using poly_sum as the transformer.
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.