Computer Science, asked by harijanbasanti41, 5 months ago

write a JavaScript to input a number and print it's table ​

Answers

Answered by nationallight1
2

Answer:

In this article we are going to print Multiplication Table of a Number using JavaScript. We take an input from the user and print the multiplication table. We use the on change event to capture the input provided by the user.

printTable() function

In this function we check whether the input provided by the user is a Number or not using JavaScript’s inbuilt function is NaN(). If the input is numeric then we print the Multiplication table in the mul span tag by concatenating the result to table variable else we display an error message to Enter a valid Number.

Explanation:

hope this ans. helps yoy

Similar questions