JavaScript - Math, String, and Number extensions

This prototype demonstrates some of the possible extensions to the Math, Number and String objects that we can add to ECMAScript. These extensions are available in other implementations (e.g., Java, C#, Python, Ruby) and would be nice to have them in ECMAScript as well.
                                                                                                                                                                                                                                                                                              
String Operation Test Input Result
String.reverse
String.containsString contains ?
String.startsWithString starts with ?
String.endsWithString ends with ?
String.toArray
String.repeatRepeat string times
Number Operation Test Input Result
Number.isFinite
Number.isNaN
Number.isInteger
Number.toInteger
                                                                                                                                                                                                                                                                                              
Math Operation Test Input Result
Math.sinh
1.1752011936438013
Math.cosh
1.5430806348152437
Math.tanh
0.7615941559557648
Math.asinh
0.8813735870195429
Math.acosh
0
Math.atanh
0.10033534773107562
Math.expm1
0.10517091807564771
Math.log1p
0.6931471805599453
Math.log10
0
Math.log2
0
Math.trunc
1
Math.sign
1
Loading...