Do I have to bpther the hint or not? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Do I have to bpther the hint or not?

I was reading how to make types of language in java scrypt and then I read this hint: The type attribute: <script type="text/javascript"> is also no longer required, as JavaScript is the default HTML scripting language. ... Do I bother with it or not?!

8th Jan 2018, 5:44 PM
lojze kiki
5 Answers
+ 4
Hmm I don't know for sure why, but probably, they just wanted to make sure that learners understood both sides of the story, that there were times when script type was necessarily defined (hence we need to know how it's written), and that now, it is no longer the case, that's how I see it. Besides, there are code samples still using the script type attribute up on the net, again probably, for the same reason, or for backward compatibility reasons, either way, there's no loss in knowing right? so don't think too much about it, let's just keep on learning : )
8th Jan 2018, 8:21 PM
Ipang
+ 6
You're welcome mate, good observation : )
8th Jan 2018, 8:30 PM
Ipang
+ 4
It was just telling you that latest standard for web script is JavaScript, hence browsers are "taught" to assume, by default, scripts without type attribute definition will be JavaScript, you can still use the type attribute, but actually, it is no longer necessary.
8th Jan 2018, 7:31 PM
Ipang
+ 1
Thank you for answering. But why it then asked me a question about how to write that? Is it cuz they didn't updated the courses?
8th Jan 2018, 7:42 PM
lojze kiki
+ 1
Thank you soo mush for your response :)
8th Jan 2018, 8:23 PM
lojze kiki