Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


I Made A New JS Library...Take A Look!

I'm really excited about this library I've created called "ExtraMath.js"! ExtraMath.js normalizes access of experimental JavaScript Math methods across all browsers that support the current Math methods (tested across Chrome, Firefox, IE 8+), adds 11 new Math functions (so far), and does not require any dependencies. Experimental Math methods (such as cbrt or cube root) are not supported across all browsers, but ExtraMath.js takes care of that by overwriting these Math methods so that support can be added to any browser that supports the current Math methods. And it is super easy to use. Just place "extramath.min.js" (or "extramath.js") before your own script, and you are good to go!

One of the examples that ExtraMath.js uniquely brings to the table is the nck function (short for nChooseK) which is used to determine the amount of ways that k groups of n objects can be combined i.e.

//Usage: Math.nck(n, k);
//Evaluates to 15, because there are 15 different ways that 2 objects
//Can be paired together from a total of 6 different objects

You can also calculate the area, perimeter, or volume of a number of shapes. All you have to do is specify the shape you wish to calculate the particular function for by using either its full name or the first 3 letters of its name:

//Usage: Math.area('cir', radius);
//OR: Math.area('circle', radius);
console.log(Math.area('cir', 3)); //Evaluates to 28.27433...

And there are several more neat functions where those come from!

You can check it out at the ExtraMath.js GitHub page.

I am open to feedback and suggestions :)

Incredibly awesome, thanks for sharing!

Thanks, Robert! Feel free to fork the repository if you like! :)