JavaScript Basics
JavaScript is used to read data, make decisions, update pages, and talk to APIs. Keep the basics clean and the advanced parts become easier.
Variables
const appName = "WebNotes";
let completedLessons = 3;
Use const by default. Use let only when the value must change.
Conditions
if (status === "PASS") {
console.log("Test passed");
} else {
console.log("Investigate failure");
}
Functions
function buildMessage(name, topic) {
return `${name} is learning ${topic}`;
}
Arrays and Objects
const testCase = {
id: "TC-101",
title: "Login with valid user",
priority: "High"
};
const statuses = ["PASS", "FAIL", "BLOCKED"];
Tester tip: most frontend data appears as objects and arrays in API responses. Learn to read them comfortably.