View Full Version : A javascript code that starts with "<"

10-13-2010, 03:17 AM
I have a project for school where I have to come up with a syntacticly correct piece of code that starts with "<" in javascript.

I dont know if there even is one.

for example:

var x = 3; //this line starts with a "v"
<3; //this starts with "<" but is not syntacticly correct and will throw an error - i need any piece of code that starts with "<" AND is syntacticly correct. any help?

10-13-2010, 03:25 AM
Can you start with HTML before the JavScript?

10-13-2010, 03:42 AM
i don't really get your idea, more spesific? Your task is make a page with simple javascript element, or just make a page that extension .JS?

10-13-2010, 04:34 AM
We aren't here to do your homework for you. Is that the whole question? If you need help with this sort of thing, please let us help by pointing you in the right direction, rather than having us actually do it for you.

In this case, I'd suggest thinking about situations where that symbol wouldn't have a functional value.

I also don't believe this is possible on a single line (it would need to be in context).

The only exception is the Javascript <script...> tag itself, but that seems irrelevant in this case.