Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
This example shows how you might create a test based on the properties of array elements.
Find the last prime number in an array
The following example returns the last element in the array that is a prime number, or undefined if there is no prime number.
Array.prototype.findLastIndex()
TypedArray.prototype.findLast()
This page was last modified on Sep 2, 2026 by MDN contributors.