Answer the question
In order to leave comments, you need to log in
What is this JavaScript somevar:'sometext' construct?
In one comment to my article there was a link from MrSLonoed to a video where the guy told and showed examples of type casting. Among other examples was
{}+[] //0
Answer the question
In order to leave comments, you need to log in
If you want to declare an object at the beginning of a line, then you just need to enclose it in parentheses: ({a:'a'})
Wow... there was never a need for labels in JS)) I didn't even think about it, since goto doesn't seem to exist in JS!? But I see they can be cleverly manipulated, up to such a moment
top:
{
a=5
break top
a=10
}
alert(a) // 5
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question