Posts by João Pedro Valejo • 31 points
2 posts
-
1
votes2
answers152
viewsQ: Can anyone explain to me how this code works?
I can’t understand the use of prototype.allReplace nor the use of RegExp. What are these parameters? String.prototype.allReplace = function(obj) { var retStr = this; for (var x in obj) { retStr =…
-
1
votes3
answers444
viewsQ: Factorial from 0 to 20 using For
I need to do the following exercise: "Using the for loop, calculate and print the factorial of all numbers between 0 and 20. Use Double type. Ex: 0! =1 1! =1 2! = 2 ... 20! = 2432902008176640000"…