r/JavaScriptTips • u/[deleted] • Apr 17 '23
Help
I’m working on a sample problem for ATA and I keep getting an “illegal parenthesized expression” error. Can someone tell me what I’m doing wrong and how can I fix it?
0
Upvotes
r/JavaScriptTips • u/[deleted] • Apr 17 '23
I’m working on a sample problem for ATA and I keep getting an “illegal parenthesized expression” error. Can someone tell me what I’m doing wrong and how can I fix it?
0
u/azronio Apr 17 '23
You don't initialize arrays like that in JS, use square brackets [0, 1, 2]. Curly braces to initialize an array is a different language syntax like C#.