6 lines
111 B
JavaScript
6 lines
111 B
JavaScript
function sqrt_to_int(num)
|
|
{
|
|
return parseInt(Math.sqrt(num)+"");
|
|
}
|
|
|
|
console.log(sqrt_to_int(17)); |