Contoh Perhitungan NaN dan Infinity Dalam Java Script
Contoh Perhitungan NaN dan Infinity Berikut adalah contoh program JavaScript yang akan menghasilkan nilai Infinity dan NaN: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Belajar JavaScript</title> <script> a = 5; b = 7; c = b / 0; console.log(c); // Hasil: Infinity (division by zero) d = 12 / 0; &nb [...]