desvendando o código
Live TikTok

Resumo da Live TikTok 15/10/2024

Olá Pessoal!

Na Live do dia 15/10/2024 trabalhamos com os Eventos em JavaScript.

INDEX

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Eventos</title>
</head>
<body>
    

    <p id="meuParagrafo"> Texto original </p>

    <button onclick="alterar()" > Alterar Texto </button>

    <script>

        const p = document.getElementById('meuParagrafo');

        function alterar(){

            p.innerText = "Texto Alterado ";
            p.style.color = "red";
            p.style.fontSize = "30pt";
        }

        
    </script>


</body>
</html>

INDEX2

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Adcionar e Remover Item</title>
</head>
<body>    

    <ul id="minhaLista">
        <li> Item 1  </li>
        <li> Item 2  </li>
        <li> Item 3  </li>
    </ul>

    <button id="botaoAdicionar"> Adicionar Item</button>
    <button id="botaoRemover" > Remover Item</button>


    <script>
        const add = document.getElementById('botaoAdicionar');
        const del = document.getElementById('botaoRemover');

        add.addEventListener('click', function(){

            const novoItem =
             document.createElement( 'li' );
            
             novoItem.textContent = "Item Novo";

             document.getElementById('minhaLista').appendChild(novoItem);
        });

        del.addEventListener('click', function(){

            const lista =  document.getElementById('minhaLista');

            lista.removeChild(lista.lastElementChild);
        })

    </script>

</body>

</html>


SCRIPT
let B = 20;
const C = 30;
const k = 5 

            if(k === 5){
             var    A = 100;
             let   B = 200; 
                console.log( "VAR " + A)
                console.log( "LET " +  B)
            }

console.log( "VAR " + A)
console.log( "LET " +  B)



SCRIPT2

var a = 10 ;

var b = "10" ;

console.log( a == b); 
console.log( a === b); 

https://go.hotmart.com/V89811082M?dp=1

https://go.hotmart.com/X90111663X?dp=1


HORÁRIO DAS LIVES

Domingo e Segunda às 19:00hs

Quarta às 18:00hs

Quinta e Sexta às 9:30hs

Sábado às 20:00hs

Leave a Reply

Your email address will not be published. Required fields are marked *