as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
create a computer program to list the first 10 prime numbers.
user
function listfirsttenprimes() {
  let primenumbers = [];
  let index = 2;
  while (primenumbers.length < 10) {
    let isprime = true;
    for (let i = 2; i <= math.sqrt(index); i++) {
      if (index % i === 0) {
        isprime = false;
        break;
      }
    }
    if (isprime) {
      primenumbers.push(index);
    }
    
    index++;
  }
  
  return primenumber;
}
assistant