Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is the below mention code json or javascript?

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Members,

Is the below mentioned code a json or javascript

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64712
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's JavaScript. JSON is not code, it is an interchange format. Calling JSON code is a lot like calling XML "code".

JSON is based upon JavaScript object literal format, so the object literal part of that code does look a lot like JSON, but it's code, not data.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64712
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And may I add that txt is a horrid variable name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic