Hello everyone I have a question I have this code
for (i=1; i>=variable; i++ ){ function formula '+i+' (){ } }
I would like to know how I make the function repeat itself automatically, I add the variable i but it says error
SyntaxError: missing (before formal parameters
I appreciate the help provided in advance
I tell you the following as I understood your exercise, it should be as follows
In the example I use, I declare the following:
tope
will be the limit respected by the forfor
I declare a function that will print the value of the variable i for each iteration that thefor
, I used template strings to print the value in questionfor
the I call the execution of the mode functionsaludo()
I had already told you that what you are trying to do cannot be done, it is already self-generated from code, which you would do with it,
$php
but if you only want tojavascript
, you can achieve it withjQuery
this way:To perform this operation, you must use bracket notation.