+ 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?

25th Aug 2018, 1:28 AM
khali
3 Réponses
+ 2
Are you talking about difference between variables and functions?
25th Aug 2018, 1:34 AM
jamilxt
jamilxt - avatar
+ 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
9th Sep 2018, 1:17 PM
Mike H
+ 1
I’m confused. Could you give an example of what you want to do?
25th Aug 2018, 5:02 PM
krikkitbot
krikkitbot - avatar