Dùng Math.asin(x) trả về arcsin của x (radian), miền xác định x ∈ [-1, 1], giá trị [-π/2, π/2]. Ngoại miền trả về NaN.
Ví dụ
<html>
<head>
<title>Phương thức Math.asin trong JavaScript</title>
</head>
<body>
<script>
document.write("asin(-1) = " + Math.asin(-1) + "<br>"); // -π/2
document.write("asin(null) = " + Math.asin(null) + "<br>"); // 0
document.write("asin(30) = " + Math.asin(30) + "<br>"); // NaN
document.write("asin('text') = " + Math.asin("Demo Text")); // NaN
</script>
</body>
</html>