does the string store previous data in javascript?
Strings in Javascript
what do you mean by previous data, if you are talking about the loop question you asked in chats
the output is 0 1 2 … because you are adding 0, 1 , 2 in string not in int
I want to know how this string is storing the data , Result is getting updated in every loop count ?
what you are doing is result += something, and not result = something, in loop
that’s why the result value is getting appended and not updated
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.