Skip to content

Instantly share code, notes, and snippets.

@ImtiazEpu
Created April 17, 2023 17:24
Show Gist options
  • Save ImtiazEpu/8bbfa1d4ab1f35d5c2b728f7e9c6c839 to your computer and use it in GitHub Desktop.
Save ImtiazEpu/8bbfa1d4ab1f35d5c2b728f7e9c6c839 to your computer and use it in GitHub Desktop.
function multiplicationTable(num) {
for (let i = 1; i <= 10; i++) {
const product = num * i;
console.log(`${num} x ${i} = ${product}`);
}
}
// Test the function with different input numbers
multiplicationTable(5);
multiplicationTable(7);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment