Saturday, 31 August 2013

Is it valid syntax to assign variables with a colon in JavaScript

Is it valid syntax to assign variables with a colon in JavaScript

I saw this on the LinkedIn developer docs:
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: [API_KEY]
onLoad: [ONLOAD]
authorize: [AUTHORIZE]
</script>
Is this valid JavaScript syntax? I understand that colon is normally used
to set the properties of an object, so I'm a bit confused with this
example using it without the context of an object.

No comments:

Post a Comment