- Incorrect Example>
- True Example>
Date()So if you write the
Date()function using all lowercase letters, the results will not appear. So it must begin with a capital letter at the beginning, in accordance with the provisions of writing the date function.
Pada contoh ini, saya memasukkan fungsi date ke dalam variabel tanggal dan kemudian menampilkannya
var tanggal = new Date(); document.getElementById("hasil").innerHTML = tanggal;
and the result
Date() function and write
Date() must begin with a capital D (Large) . When you enter the
Date() function starting with lowercase letters, the function will not display an alias Error. But the example above is a very simple date creation, friend, you can give a css style so that the date looks more beautiful.