I have a global variable that is used in a function, then I use a script to test the function result using the alert function
Alert("Variable","Function());
Alert(" Function ()","Variable");
but when I alert the result of the function and the global variable the result differs if I mention the variable before the function, I get the global variable with the value that should have been assigned to it by the function correctly, but when I mention the function before the variable, the variable shows the initialized value
as below in SS I just changed the order of the global variable and the function in the alert function which reflected on the value of the global variable as once it has the correct value that it should be assigned to it by the function and the other time it has the initiation value "8501"
I just need to understand why the order of the parameters in the alert function is reflected in the result of the variable, noting that this global variable is used only by this function
is the line read by the system from right to left?
Thanks in advance
Alert("Variable","Function());
Alert(" Function ()","Variable");
but when I alert the result of the function and the global variable the result differs if I mention the variable before the function, I get the global variable with the value that should have been assigned to it by the function correctly, but when I mention the function before the variable, the variable shows the initialized value
as below in SS I just changed the order of the global variable and the function in the alert function which reflected on the value of the global variable as once it has the correct value that it should be assigned to it by the function and the other time it has the initiation value "8501"
I just need to understand why the order of the parameters in the alert function is reflected in the result of the variable, noting that this global variable is used only by this function
is the line read by the system from right to left?
Thanks in advance