Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Uncaught SyntaxError : Unexpected Token
Message
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01618431
Message ID:
01618445
Vues:
40
>Is there anything wrong with this sample JavaScript code?
>
>var arrayOfStuff [{'name' : 'value'},[1,2,3],true,"nifty"];
>
>It doesn't seem to like the object. See the below error message:
>
>Uncaught SyntaxError: Unexpected token
> at Object.InjectedScript._evaluateOn...

In addition to Viv's reply, what exactly do you want your array to consist of? The things you list there do not make sense.

If you want array of objects, I would do:
var arrayOfObjects  = [{name:"First Object"}, {name: "Second Object"}]
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform