Question: JavaScript what are the Solutions? Dont guess! 6.9- Surround the call to processNumbers with a try-catch statement. The catch block should display the thrown message

JavaScript what are the Solutions? Dont guess!

6.9- Surround the call to processNumbers with a try-catch statement. The catch block should display the thrown message and assign processedValue with -1.

var toProcess = [ 1, 2, 5, 7 ]; // Code will be tested with different arrays. var processedValue = 0;

//Your solution goes here

-------------------------------------------------

8.1- Write a statement to display the year from the regular expression match in result. Note: The given date is in day, month, year order.

var re = /(\d+)\-(\d+)\-(\d+)/; var date = "17-8-2012"; // Code will also be tested with value "8-11-92" var result = re.exec(date);

/* Your solution goes here */

-------------------------------------------------

8.2 -Create a Kitten class with properties color and age passed to the constructor.

/* Your solution goes here */

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!