<sectionid="description"> Las variables que se declaran dentro de una función, así como los parámetros de la función tienen alcance <dfn>local</dfn> . Eso significa que, sólo son visibles dentro de esa función. Aquí hay una función <code>myTest</code> con una variable local llamada <code>loc</code> . <blockquote> función myTest () { <br> var loc = "foo"; <br> console.log (loc); <br> } <br> mi prueba(); // logs "foo"<br> console.log (loc); // loc no esta definido </blockquote><code>loc</code> no está definido fuera de la función. </section>
<sectionid="instructions"> Declarar una variable local <code>myVar</code> dentro de <code>myLocalScope</code> . Ejecute las pruebas y luego siga las instrucciones comentadas en el editor. <strong>Insinuación</strong><br> Actualizar la página puede ayudar si te quedas atascado. </section>