Convert our temporary string into integer
let temp = 0 ; for ( let j = 0 ; j < str . length ; j ++ ) temp = temp * 10 + ( str [ j ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ) ; k = Math . floor ( Math . sqrt ( temp ) ) ;