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