Assignment Statement | SoloLearn: Learn to code for FREE!

+3

Assignment Statement

Is the assignment statement collecting new data by building off of the old data that was initialized. I don’t really have to declare an Int multiple times for a method , I can do it once, but the method has to be the same for all?

8/25/2018 1:28:25 AM

khali

3 Answers

New Answer

+2

Are you talking about difference between variables and functions?

+2

When working with variables, any assignment completely replaces the information that was in the variable previously. In general the type of the variable will stay the same when changing the information it contains (a string will still be a string, a number will still be a number); however you can convert the variable between types if necessary. You can check out this link to learn more: https://www.w3schools.com/js/js_type_conversion.asp

+1

I’m confused. Could you give an example of what you want to do?