Question: Write a function that searches the string ( passed as first argument ) for the character ( passed as second argument ) and changes the

Write a function that searches the string (passed as first argument) for the character (passed as second argument) and changes the case for all instances of that char found in string. The function should return the new string as shown in example below: function(abRA,a)// returns AbRaAssignment-2(2).pdf + X A file:///C:/Users/bhati/OneDrive/Desktop/Assignment-2(2).pdf 5 of 6 O + Fit to page IL Page view AV Read aloud 1 Add notes 6 String built-in functions endsWith() includes() indexof) lastIndexOf() localeCompare() match() repeat) replace() search() slice () split() startsWith() substr() substring() toLocaleLowerCase() toLocaleUppercase () toLowerCase() toString() toUpperCase() trim() valueof() trimLeft and trimRight unshift () valueof() Array built-in functions concat() copywithin() every() XO10 fill() filter() find() findIndex() forEach() indexOf() isArray () join() lastIndexOf() map) pop) push() reduce () reduceRight() reverse() shift slice some () sort () splice () toString() Type here to search CX ( o C) ENG 7:21 AM 2020-07-31

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 Programming Questions!