Is this defined by the language? Is there a defined maximum? Is it different in different browsers?...

I need javascript to add 5 to an integer variable, but instead it treats the variable as a string, so it write out the variable, then add 5 onto the end of the "string". How can I force it to do math instead? var dots = document.getElement...

How do I parse and evaluate a mathematical expression in a string (e.g. '1+1') without invoking eval(string) to yield its numerical value? With that example, I want the function to accept '1+1' and return 2....

According to Google Calculator (-13) % 64 is 51. According to Javascript (see this JSBin) it is -13. How do I fix this?...

Want to improve this post? Provide detailed answers to...

Why when I use this: (assuming i = 1) divID = "question-" + i+1; I get question-11 and not question-2?...

Hi I am trying to solve a math problem where I take a number e.g. 45, or 111 and then split the number into separate digits e.g. 4 5 or 1 1 1. I will then save each number to a var to run a method on. Does anyone no how to split a number into indiv...

Looking for a really fast implementation of factorial function in JavaScript. Any suggests?...

How do you do exponents in JavaScript? Like how would you do 12^2?...

I need to evaluate user-entered arithmetic expressions like "2 * (3 + 4)" in Javascript but I don't want to use eval for security reasons. I could strip out all the characters that are not numbers or operators but I'm not sure thi...

©2020 All rights reserved.