Skip to content
Advertisement

Tag: variables

how javascript handles variables in objects?

I have a question about declaring a variable in an object. Assuming that global or window is also an object, why is it not possible to declare a variable using let in an object that is a child of the window object? I do not understand that. Thanks for the answer and sorry for the English but I hope you

Proper variable name for find method [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 8 months ago. Improve this question I’m Japanese web developer. I’m currently thinking about the proper variable name for the result from javascript find method. I would

discordjs v13 – subtract the variable

The code doesn’t work when it subtract the variable (enemy’s health) This is my code I wonder at the damage – ene_health why it doesn’t subtract the enemy’s health I am using discord.js v13 and quickdb Answer isn’t doing anything. In your case you have to CHANGE the damage variable. or even better, use the Substract assignment :

How can I assign forEach to variable? Its possible?

Hello everyone:) I’m trying to write rock, paper, scissors game but I have a little problem. Is there any option to assign let playerChoice = buttons.forEach… to any variable as I did in this code? Unfortunately, it doesn’t work like this. I attached my code below. Thanks for any tips! Answer You can’t use forEach to do what you want

Advertisement