Jun 5, 2024
Browser JavaScript Console
console.log('Hello World');
Setting Up Development Environment
Basic HTML Integration
index.html
.Live Server
extension.<script>
element.<script>
at the end of the body tag.JavaScript and Node.js
let name;
, const interestRate = 0.3;
const
.let name = 'Mosh';
let age = 30;
let isApproved = true;
let firstName;
(or explicitly let firstName = undefined;
)let selectedColor = null;
let person = { name: 'Mosh', age: 30 };
person.name
) or Bracket notation (person['name']
).let selectedColors = ['red', 'blue'];
selectedColors[0];
.length
.function greet(name) { console.log('Hello ' + name); }
greet('John');
function greet(firstName, lastName) { ... }
function square(number) { return number * number; }