Skip to main content
1 of 2
user avatar
user avatar

JavaScript (Node.js), 48 bytes

a=>a.filter(b=>eval([...b+""].join`+`)**.5%1==0)

Try it online!

Explanation

a =>                                  // lambda function taking one argument
    a.filter(                         // filter the list
        eval(                         // begin eval
            [...b+""]                 // convert number to array of digits 
                .join`+`              // join them with + sign
            )                         // close eval. we achieved sum of all elements of digits
        **.5                          // square root of number
        %1==0                         // check for perfect square
    )                                 // end filter and return value
user82328