Questions tagged [unexpected-token]
213 questions
-4
votes
1 answer
I'm getting a syntax error saying "unexpected token" when adding the discord.py file in visual studio
So I usually code in C++ and this is my first time using python. I'm trying to code a Discord bot and I'm following along with a tutorial. It said to add this line to the top of my code
py -3 -m pip install -U discord.py
I get four syntax errors…

Bismark_The_2nd
- 1
- 3
-4
votes
2 answers
Reactjs Unexpected token error
This is my code below, and when I tried to run it on localhost, nothing shows up, and in the console it says "Uncaught SyntaxError: Unexpected token <". (in line "
const { render }=ReactDOM
const style={
backgroundColor:'orange',
…

cece
- 67
- 1
- 1
- 5
-5
votes
2 answers
Javascript arrow function unexpected token on if condition
Can somebody tell me please what is wrong with this arrow function. It throws me an error
unexpected token on begin of if condition
selected_devices
.map( device => if( device.device_id === device_id ) device.source = 'included' )

Čamo
- 3,863
- 13
- 62
- 114