JavaScript Tutorial




Lesson 7 - Alerts




You might have heard about modals. They are HTML CSS only popups that you can make. they usually take up lots of divs and are very big to make. But what if i told you that you can make the same in JS, using only 1 line of code? May i present : The Alert.

The Alert is a modal which removes style for efficiency. It is triggered like alert("You message");. If you want to show a variable, it is like alert(variableName);. The code for arrays is also the same. alert(arrayName[0]);




< Previous------------------------- Next >