Sorry, your browser is not supported
To have the best experience using Skillshare, we recommend that you use one of these supported browsers.



First JavaScript

<div id="btn1" onclick="alert('hello');">Click Me 1</div>

<div id="btn2">Click Me 2</div>
<div id="btn3">Click Me 3</div>
document.getElementById("btn2").addEventListener("click", function () {
        alert('Hello 2');
    document.getElementById("btn3").addEventListener("click", function () {
        alert('Helllo\nWor\nld'); //Test out line breaks
        this is a comment
<script src="script.js"></script>



Please sign in or sign up to comment.