"defer" in script tag not working

Why doesn’t it work in FCC’s code editor?

because the code editor is an hack to make the html css and javascript work together from a mocked filesystem, not an actual filesystem. Instead of defer, you need to put the javascript script tag as last thing in the body tag

1 Like

Does FCC use VS Code as its editor in the back-end? Scrimba does as well and “defer” works there.

Really not a big fan of script tag inside body. I solved it by wrapping the entire js code in a window.load event function.

No, it doesn’t use VSCode in the back-end. The editor is all front-end