Day 3
Sign back in!
Username: first_lastInitial (example: rohan_b)
Password: ilovecoding!
JS stands for JavaScript.
JavaScript is an actual programming language. Technically, so far we were using markup languages.
<script>
alert('hi');
</script>
Everything is an instruction.
Every line of JS is an instruction your computer runs.
Your computer runs them in order.
A function is a group of instructions that perform a task
alert('your message here');
alert('hello ' + 'world!');
Variables are a way of storing information in JavaScript
As we saw, you write text to display within quotation marks when dealing with JavaScript.
Similarly, we store text in quotes.
Numbers don't need quotes since they represent a mathematical value instead of text.
let applePrice = 5.0;
let userName = 'Rohan';
alert(userName + ' bought an apple for $' + applePrice);
applePrice = applePrice + 1;
alert('Apple prices rose to $' + applePrice + '!');
let userName = prompt('What is your name?');
alert('Hello ' + userName);