Im working on a problem in javascript where I am supposed to write a function that takes in an array of integers, and a string that will be either ‘even’ or ‘odd’. The function will count how many times 4 even or 4 odd numbers show up in a row. For example: so far this is where I am at:
Tag: modulus
Getting place values of a number w/ modulus?
I need to get the place value of a random number submitted by a user. This number can by anything from 0-1000000000000000 (zero to one trillion). I think this can be achieved by using the JavaScript modulus % operator. The problem, I don’t really know how to use it, nor do I understand it. Here is the Fiddle. (All I