let number = 0;
while(number <2 || number >9){
number = Number(prompt("Enter a number between 2 and 9"))
}
for(i = 1; i <= 10; i++){
result = (number * i)
console.log(`${number} x ${i} = ${result}`);
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter