Web development
JavaScript and Your First Program
Updated Oct 28, 2026
JavaScript is a programming language used to add behaviour to web pages and in other environments. A browser can run JavaScript included in an HTML page. The console is useful for testing and seeing e
What you’ll learn
Understand and practise javascript and your first program.
Explanation
JavaScript is a programming language used to add behaviour to web pages and in other environments. A browser can run JavaScript included in an HTML page. The console is useful for testing and seeing errors. Use a script element or link a local JavaScript file.
JavaScript ជាភាសាសរសេរកម្មវិធីដែលអាចបន្ថែមសកម្មភាពទៅទំព័របណ្ដាញ។ Browser អាចដំណើរការវា ហើយ console ជួយសាកល្បង និងមើលកំហុស។
Example
console.log("Hello, world!"); writes a message to the browser console.
Practice
Where can you see the output of console.log in a browser?
Answer and explanation
Show answer / បង្ហាញចម្លើយ
Open the developer tools and look in the Console.
Quick recap
JavaScript is a programming language used to add behaviour to web pages and in other environments.