Declaring multiple variables in JavaScript

后端 未结 17 770
时光说笑
时光说笑 2020-11-22 13:16

In JavaScript, it is possible to declare multiple variables like this:

var variable1 = "Hello, World!";
var variable2 = "Testing...";
var          


        
17条回答
  •  盖世英雄少女心
    2020-11-22 13:43

    It's just a matter of personal preference. There is no difference between these two ways, other than a few bytes saved with the second form if you strip out the white space.

提交回复
热议问题