Is there a difference? : <p>Take the following code example</p>

<p>block 1</p>

<pre><code>var myObj = {}

if(true){
 myObj = {
   name: "John",
   age: 54,
   phone: "33333"
 }
}else {
  myObj = {
   code: "E233",
   qty: "34"
 }
}
</code></pre>

<p>block 2</p>

<pre><code>if(true){
 var myObj = {
   name: "John",
   age: 54,
   phone: "33333"
 }
}else {
  var myObj = {
   code: "E233",
   qty: "34"
 }
}
</code></pre>

<p>Is there a drawback in declaring variable <strong>myObj</strong> inside <strong>if/else</strong> statement?</p>
