This is a syntactic shorthand, and identical to:
var a = b;
var c;
var d;
The first one (a) gets initialized with the value of b, but c and d are uninitialized.
More Related Contents:
- How do JavaScript closures work?
- JavaScript check if variable exists (is defined/initialized)
- How can I determine if a variable is ‘undefined’ or ‘null’?
- Static variables in JavaScript
- Convert string to variable name in JavaScript
- Javascript Regex: How to put a variable inside a regular expression? [duplicate]
- How to check a not-defined variable in JavaScript
- JavaScript variable definition: Commas vs. Semicolons
- Why is the value of my input always empty if I store it in a variable?
- JavaScript check if variable exists (is defined/initialized)
- “Variable” variables in JavaScript
- Pass vars to JavaScript via the SRC attribute
- Set Webkit Keyframes Values Using Javascript Variable
- Dynamic variables names in javascript
- javascript pass object as reference
- Global variables in Google Script (spreadsheet)
- Variables set during $.getJSON function only accessible within function
- Dynamic object property names?
- how to access object property using variable [duplicate]
- Append to string variable [closed]
- Global variables in Javascript and ESLint
- Why does shadowed variable evaluate to undefined when defined in outside scope?
- How can I make a program wait for a variable change in javascript?
- Variable re-assignment of object reference leaves other object unaltered (no “transitive” assignment)
- What does [] mean in JavaScript?
- How to access a JavaScript variable from code behind in asp.net
- Why does accessing a non-existent object property result in `undefined` instead of throwing a `ReferenceError`?
- JSON to string variable dump
- Can a JavaScript variable be used in plain HTML?
- Javascript: Get access to local variable or variable in closure by its name [duplicate]