It seems like string has similar function of storing data in variable? What's the difference and how you use it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

It seems like string has similar function of storing data in variable? What's the difference and how you use it?

Difference between var and string

22nd Dec 2016, 2:20 AM
Marcus Foon
2 Answers
+ 2
A string is a specific type of variable. var denotes some general variable type.
22nd Dec 2016, 2:26 AM
James Durand
James Durand - avatar
0
var is a keyword to declare a variable, string is a type of variables.
22nd Dec 2016, 3:07 AM
ADEL MAHJOUB
ADEL MAHJOUB - avatar