Aug 25, 2024
console.log('Hello World');
2 + 2;
alert('Yo');
js-basics
).index.html
and add basic HTML boilerplate.<script>
element in the index.html
file at the end of the body.console.log('Hello World');
let
(for reassignable variables) or const
(for constants).let name = 'Marsh';
const interestRate = 0.3;
let age = 30; // Number
age = 'thirty'; // Now a String
let person = { name: 'Marsh', age: 30 };
function greet(name) {
console.log('Hello ' + name);
}
return
keyword.