8.7
JavaScript, testing and debugging (8.7) is a Class 9 Computer Science lesson for the Punjab boards. It walks through the idea in plain steps, then sets a short check, in English, Urdu or Roman Urdu.
Your guide: Miss HiraExplains computers with chai, cricket and your phone.
Chapter 1 of every subject is free. Unlock every chapter of this class with the full course.
Unlock full courseAlready paid? Sign in with the Google account you paid with.
JavaScript (Brendan Eich, 1995) makes pages interactive. Variables are declared with var, let or const and hold strings ("Athar"), numbers (15), booleans (true) or arrays ([90, 85, 88]).
A function is reusable code: function addNumbers(a, b) { var sum = a + b; alert('The sum is: ' + sum); } then addNumbers(5, 3) shows 8. Events such as onclick, onload, onmouseover and onkeyup call functions.
Debug with browser developer tools (console, breakpoints), read error messages and check code for missing semicolons or braces. Test across browsers, screen sizes and real users.
Step 1 / 1
JavaScript (Brendan Eich, 1995) makes pages interactive. Variables are declared with var, let or const and hold strings ("Athar"), numbers (15), booleans (true) or arrays ([90, 85, 88]).
A function is reusable code: function addNumbers(a, b) { var sum = a + b; alert('The sum is: ' + sum); } then addNumbers(5, 3) shows 8. Events such as onclick, onload, onmouseover and onkeyup call functions.
Debug with browser developer tools (console, breakpoints), read error messages and check code for missing semicolons or braces. Test across browsers, screen sizes and real users.
Event → function → change on the page.
Found a mistake? Tell us the lesson and the line at exciting@boringeducation.com.
No ads. Tell us what to fix.