Skip to content

Autonumbering upon keyboard press

I have an autonumbering when Ctrl and Enter are pressed. My current problem is, when i start my autonumbering at the 3rd textbox, my 2nd textbox is getting affected. How can i retain the other values of my textbox? The textbox before them should not change their value. Thank you. Answer You can create a varia…

How to repeat random string with .repeat() and make it still random?

Is there some way to make random strings with .repeat() still random? If I use this: the output is something like this: In a nutshell, the output is the same. Answer What your code currently does is: Generate a random number within a string Repeat n times that string. What you want is generate n random number…

Cant override the color with javascript

i want to make the color of the number green if its more than zero to make it green and want to be red when its below zero but i cant do it i dont get why can anyone explain Answer The order in your code is not correct. You must get an element after it is added to DOM.