What variable used for? and what funcation used for? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What variable used for? and what funcation used for?

Hello everyone I need your help please I'm beginner of java script please answeer me

12th Jul 2018, 3:20 PM
nwenar ismail
nwenar ismail - avatar
3 Answers
+ 4
Variable : Suppose you have to display message to screen multiple time. You can do it normally by writing message in your script multiple times. But think if its about 1000 time or more. Than Instead of writing message multiple time we can store it in variable and use that to reference message Hope this helps☺️☺️.
12th Jul 2018, 3:27 PM
Meet Mehta
Meet Mehta - avatar
+ 1
thank you too much
12th Jul 2018, 3:25 PM
nwenar ismail
nwenar ismail - avatar
0
thank you bro
12th Jul 2018, 3:36 PM
nwenar ismail
nwenar ismail - avatar