Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
Unlike most programming languages, JavaScript is already installed on your computer! Every web browser (Chrome, Firefox, Safari, Edge) comes with JavaScript built right in. You can start coding in the next 30 seconds.
Any browser works - Chrome, Firefox, Safari, or Edge
Or Ctrl+Shift+J (Windows) or Cmd+Option+J (Mac)
Go to Console tab and type your first code
// Type these one by one and press Enter after each
console.log('Hello, JavaScript!');
2 + 2
let name = 'Your Name';
console.log('Welcome, ' + name + '!');
Math.random()When you want to build a real website, you'll create HTML files and add JavaScript to them. Here's how:
Create a file called index.html
Add your JavaScript code inside <script> tags
Double-click the file to open it in your browser
Copy this entire code, save it as index.html, then open it in your browser
1<!DOCTYPE html>
2<html>
3<head>
4 <title>My First JavaScript Page</title>
5</head>
6<body>
7 <h1>Hello, World!</h1>
8 <button id="btn">Click Me!</button>
9 <p id="message"></p>
10
11 <script>
12 // Your JavaScript goes here
13 const button = document.getElementById('btn');
14 const message = document.getElementById('message');
15
16 button.addEventListener('click', () => {
17 message.textContent = 'You clicked the button! 🎉';
18 });
19 </script>
20</body>
21</html>script.js) and link it like this:<script src="script.js"></script>Run the installer and follow the simple setup steps
Open terminal and check: node --version
app.js// app.js - Save this file
console.log('Hello from Node.js!');
const name = 'Developer';
console.log(`Welcome, ${name}!`);
// Do some math
const result = 10 + 20;
console.log('10 + 20 =', result);node app.jsFree, powerful, with tons of features. Highly recommended for beginners and pros!
Download VS Code →Start with Browser Console (F12). No setup needed at all!
Use HTML files with <script> tags. Save and open in browser.
Install Node.js and use VS Code editor.