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

20th Apr 2018, 11:23 AM
Shivraj Ichage
Shivraj Ichage - avatar
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
20th Apr 2018, 11:28 AM
RZK 022
RZK 022 - avatar
0
Start your js with string 'use strict'; because it defends of important errors
20th Apr 2018, 2:50 PM
Sergey Vishnevsky
Sergey Vishnevsky - avatar