JavaScript TypedArray.prototype.findLast() Method Last Updated : 28 May, 2024 Comments Improve Suggest changes Like Article Like Report A new method, TypedArray.prototype.findLast(), was introduced in ECMAScript 2023 (ES2023). The method findLast() of instances TypedArray proceeds traverse over the typed array backwards and provides method returning the value of the first element that satisfies the supplied testing function. When there are no elements fulfilling the function criterion then it returns an undefined. SyntaxfindLast(callbackFn) ORfindLast(callbackFn, thisArg)Parameter:callbackFn: A function that must be executed for each element in typed array, its return value will indicate whether or not a matching element has been found, the function is called with the following arguments- element: It is the current element that findLast() was called upon on a typed array. index: It is the index of current element which is being processed in the typed array. array: The typed array findLast() was called upon.thisArg: (Optional) A value to use as this when executing callbackFn.Return Type:The highest index in an array that matches a given testing function otherwise, it will return undefined if no match found. Example 1: In this example, we are finding last even number from an array. JavaScript const numbers = new Int8Array([-1, 2, 8, 5, 12, 3]); const lastEven = numbers.findLast(element => element % 2 === 0); console.log(lastEven); Output: 12Example 2: In this example we are finding the element greater than 10. JavaScript const typedArray = new Uint8Array([5, 10, 15, 20, 25]); const result = typedArray.findLast(element => element > 10); console.log(result); Output: 25Supported BrowsersChromeEdgeFirefoxOperaSafari Comment More infoAdvertise with us Next Article JavaScript TypedArray.prototype.findLast() Method P pankajbind Follow Improve Article Tags : JavaScript Web Technologies javaScript Similar Reads JavaScript TypedArray.prototype.findIndex() Method Method TypedArray.prototype.findIndex() of JavaScript returns the index of the first element in the typed array that fulfils the conditions specified by the testing function, if no elements satisfy it, -1 is returned, the findIndex() method takes a callback function as an argument and it returns an 2 min read JavaScript TypedArray.prototype.toSorted() Method The toSorted() method, presented in ECMAScript 2023 or (ES2023) affords a secure and efficient manner of ordering elements of TypedArray in ascending order. The toSorted() method of TypedArray instances is the copying version of the sort() method, it gives back a new typed array with sorted elements 1 min read JavaScript TypedArray.prototype.toReversed() Method In JavaScript, Array.prototype.toReversed() method is used to reverse an array. It returns a new array that has elements in reverse order. Syntax :toReversed()Parameter:This method does not accept any parameter. Return Value:This method returns a newly formed reverse array. Example: This example sho 1 min read JavaScript typedArray.includes() Method The typedArray.includes() is an inbuilt function in JavaScript which is used to check whether a particular element is included by the given typedArray or not and accordingly it returns true and false. Syntax: typedarray.includes(Element, Index); Parameters: It accepts two parameter which are specifi 2 min read JavaScript typedArray.sort() Method The typedArray.sort() is an inbuilt function in JavaScript which is used to sort the elements of the given typedArray and return the new typedArray with the sorted elements. Syntax: typedArray.sort(); Parameter: It does not accept any parameters. Return value: It returns the new typedArray with the 1 min read Like