How do I get all the digits from 0 – x if x is a variable like so:
var x = 5
Then loop then so it logs them all individually by console.log()?
I was thinking I could use .each(), but it might make more sense to use something like for or while. I would post code, but I honestly can’t think of a good/possible way to do this.
This is really pretty basic:
(Use
<=if you want to include the value ofxin the output.)