Question: (35 points) Using JavaScript only, create a function that validates ISBN-10 values. The ISBN format is as follows: 0-000-00000-0 The first nine digits (excluding the

 (35 points) Using JavaScript only, create a function that validates ISBN-10

(35 points) Using JavaScript only, create a function that validates ISBN-10 values. The ISBN format is as follows: 0-000-00000-0 The first nine digits (excluding the dashes) can be any digit (0-9), whereas the last digit can be also any digit from 09 plus one check character ( X, which represents 10). ISBN10 can be validated with the following formula: (n110+n29+n38+n47+n56+n65+n74+n83+n92+n101)mod11==0 Where n1 to n10 represents the corresponding digits. If the result is 0 , the ISBN-10 is valid (and the function must return true, otherwise false). Keep in mind that the function must take the ISBN-10 value as a parameter. For example: If the ISBN value is 3-598-21508-8: (310+59+98+87+26+15+54+03+82+81)mod11==0 The function must return true since it is a valid ISBN. Another example: 3-598-21507-X (Don't forget that X represents "10") (310+59+98+87+26+15+54+03+72+101)mod11==0 This function will also return true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!