Write a function findLongestWord() that takes an array of words and returns the length of the longest one.
please write HTML and javascript code thanks
SCREENSHOT OF THE FUNCTION

COMPLETE CODE TO COPY
<!DOCTYPE html>
<html>
<body>
<p id="answer"></p>
<script>
function myFunction(a) {
var i, longest = 0;
for (i = 0; i < a.length; i++) {
if(longest < a[i].length)
longest = a[i].length
}
return longest;
}
document.getElementById("answer").innerHTML = myFunction(
["Chegg", "IN", "CheggIndia", "Alecia"]);
</script>
</body>
</html>
OUTPUT
10
--------------------------------------
Hit the thumbs up if you are fine with the answer. Happy
Learning!
Write a function findLongestWord() that takes an array of words and returns the length of the...
MATLAB Write a function maxContent(arr) that takes a cell array arr as input and returns the longest string and largest number in arr. If there are two character arrays of same length, the function should return one of them. Assume that integers in the cell array are nonnegative.
Javascript function that takes an array parameter and returns an array value. The assumption is that the array is an integer array. The returned array should be composed of the square of the elements in the array parameter for the corresponding position.
JavaScript Write a function named "sort_by_length" that takes a list/array of strings as a parameter and sorts the strings by their length
MATLAB function Write an efficient function, f(v) that takes a one-dimensional array of length N^2 for a square matrix (in a row-vectorized form) as an input and returns the trace of the matrix.
Write assembly code for a function that returns the sum of an integer array. The function should receive the start address and the length of the array.
create a javascript function named sumBeyond that takes in an array of numbers and returns the summation of the values in the array that are greater than (but not including) 42. If there are no values greater than 42, the function should return 0. example- sumBeyond([2,85,932,0,7,-5,0,32]) must return 1017
Write a value-returning C++ function returns the average length of an array of strings. Name the function stringsAverageLength and use the following header: double stringsAverageLength(string array [], int n) { } where the parameter 'array' has 'n' strings and the return value is the average length of all of the strings in the array. For example, if the function is called like this: string cars[3] = { "Toyota", "Ford", "Tesla" }; cout << fixed << setprecision(2) << stringsAverageLength(cars, 3) <<...
Hi, I need help with Javascript please. Question: Write a function named "tweets" that takes a string as a parameter and returns the number of tweets required to tweet the input to the world. Note: The maximum length for a single tweet is 280 characters. Thanks!
1. Write a function named findTarget that takes three parameters: numbers, an array of integers - size, an integer representing the size of array target, a number The function returns true if the target is inside array and false otherwise 2. Write a function minValue that takes two parameters: myArray, an array of doubles size, an integer representing the size of array The function returns the smallest value in the array 3. Write a function fillAndFind that takes two parameters:...
Code in C++ please! Write a function that takes an array of integers as an input parameter (the address of the first value of the array). It returns nothing. It prints out the array as a single line, with commas between each number, and when the array is finished being printed, it prints an endl; so that we flush the buffer and move to a new line. (I’m having you write this function because you’ll be wanting to print out...