0
How to start first line of js
I don't know how the first line is written in is for example : we write <html> in html like this
2 Answers
+ 2
js doesn't require any specific first line like many others do.
Just start writing the code in js section. But in some cases we use:
window.onload = () => {
// Code goes here
};
I highly recommend you to refer to js tutorial in sololearn , learn section:
https://www.sololearn.com/Course/JavaScript/?ref=app
0
Start your js with string 'use strict'; because it defends of important errors