In JavaScript, how to find Strong number & Perfect number? [closed]

In JavaScript, how to find Strong number & Perfect number?
Some foundational questions:
how do we extract digits in Javascript using while loop?

How do we find out STRONG NUMBERS or not using while loop?

What is a nested while loop?

thank you

Definition: Strong numbers are the sum of factorials are same as the original number(eg.145)
Perfect numbers are the sum of the proper divisors make the sum(eg.28)

About Strong numbers, the steps are:

  1. Extract digits
  2. Factorials
  3. Sum up the factorials
  4. Check whether the sum is the same as the original number

Need to know the programming.

thx