http://www.w3schools.com/html/html_computercode_elements.asp
Above web page mentioned following one as a computer code. I wish to know whether it is possible to develop a program using this as a computer code. If so, please develop.
var person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue" }
HTML and Var
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted Oct 19, 2014, 2:07 AM EDT
It's declaring a javascript object with 4 properties and their values. The syntax has some similarity to creating an anonymous type in C# though we'd use = in place of : for that.
It's possible to create javascript programs which run outside of a browser though it won't be very interesting unless we add more lines to it than that one.
MahaRank #2,573 · 543 reputationPosted Oct 19, 2014, 2:13 AM EDT