function sqrt_to_int(num) { return parseInt(Math.sqrt(num)+""); } console.log(sqrt_to_int(17));