I'm trying to learn JavaScript. I'm very new (started this week). I'm following the exercises available at javascript.info.
This is the html code I'm opening in firefox:
<p>First, we have a prompt that incorrectly concatenates input strings.</p>
<script>
let a = prompt("First number?", 1);
let b = prompt("Second number?", 2);
alert(a + b); // 12
</script>
<p>Now we correctly cast to integer, and then do addition.</p>
<script>
let a = prompt("First number?", 1);
let b = prompt("Second number?", 2);
a = Number(a);
b = Number(b);
alert(a + b); // 3
</script>
<p>Well, that's all folks!</p>
For some reason, the first script will run, but the second won't. I've checked around (https://www.quora.com/Can-I-call-two-JavaScript-files-in-one-HTML-file and Implications of multiple <script> tags in HTML) and it seems like they should just run in sequence.