Question: Please Write in JavaScript AND WITHOUT USING ANY JavaScript BUILT - IN FUNCTIONS This funtion that takes an array and a number as 1 st

"Please Write in JavaScript AND WITHOUT USING ANY JavaScript BUILT-IN FUNCTIONS
This funtion that takes an array and a number as 1st and 2nd arguments respectively. The fuction will
sum the values of array UNTIL the sum is greater or equal to the
number passed to the function. The function will
then return the value
E.g.function([6,2,3,5],8)//returns 6
E.g.function([6,2,3,5],11)//returns 11
THis funtion that takes an array as argument and will
loop through the array elements and acquire the sum of ASCII value
of each character in element and return the total.
E.g. function([Q,iy,72]); // returns XO08412
which is the sum of 81(Q)+105(i)+121(y)+55(7)+50(2)
NOT ALLOWED TO USE:
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() concat() copyWithin() every() fill() filter() find() findIndex() forEach() indexOf() isArray() join() lastIndexOf() map() pop() push() reduce() reduceRight() reverse() shift() slice() some() sort() splice() toString()"

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!