Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 (language knowledge comprehension, 5 marks) There are five errors in lines of the code below. List five of them and: identify the line

image text in transcribed

QUESTION 1 (language knowledge comprehension, 5 marks) There are five errors in lines of the code below. List five of them and: identify the line by number, state if the error is an interpreter (syntax) error or a runtime (logic) error, and . give a corrected version of the entire line 01 var msg I wish to wish the WISH you wish to wish but if you wish' 02 03 04 05 document.writeIn(Found countTerms(msg) +'wishes.); 06 07 function countTerms(phrase) -{ 08 var i-l; 09 var count 0 10 | var terms = phrase.split( '); 11 | for (i = 0; i + 'the WISH the witches wish I won't wish the WISH you wish + 'to wish' if (terms[i].toUppercase)'WISH') count++

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What HTML creates the "alpha" table cell?

Answered: 1 week ago

Question

Identify specific IT applications for HR planning.

Answered: 1 week ago

Question

7. How will you encourage her to report back on the findings?

Answered: 1 week ago

Question

Were the decisions based on appropriate facts?

Answered: 1 week ago

Question

Were the right people involved in the decision-making process?

Answered: 1 week ago