Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aula 10 #82

Open
leobarbosadev opened this issue Nov 17, 2023 · 0 comments
Open

Aula 10 #82

leobarbosadev opened this issue Nov 17, 2023 · 0 comments

Comments

@leobarbosadev
Copy link

leobarbosadev commented Nov 17, 2023

Boa noite

Ao invés de criar a variável igual ele fez na aula, posso fazer de forma direta? Está semanticamente correto?

Ele criou dessa forma, mas disse que dá problema de uso de memória.
var a = document.getElementById('area')
a.addEventListener('click', clicar)

Mas dessa forma também funciona e assim evitaria o erro de uso de memória que ele cita?
document.getElementById('area').addEventListener('click', clicar)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant