Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.
I could be able to help you with this but I would like it if you could further explain what you mean. I don't really understand any of what you just said. Thanks.
 
Operators are symbols that represent simple computations. For example, the addition operator is + , subtraction is - , multiplication is * , and division is / . ... When the program runs, each variable is replaced by its current value, and then the operators are applied. The values operators work with are called operands.

C# Variables & Operators with Example: https://www.guru99.com/c-sharp-variables-operator.html
Javascript Operators: https://www.w3schools.com/js/js_operators.asp
Operators - C++ Tutorials: http://www.cplusplus.com/doc/tutorial/operators/
 
You're Variables need to be something like this:
var Operator = 12; or var Operator;.

Your Variable must be declared with a Value or no Value(You can initialize the Value later in the Code). You're Variable can also be in the negatives, so:
var Operator = -12;

Hope this helps.
 
Look, it's really hard to understand what you're saying but from what I'm looking at, you want to declare a Variable and initialize that Variable with an Operator-Symbol such as +, -, * or /, correct? If so, you cannot do such a thing. Symbols are not and cannot be Values in Programming. That applies to every Career, aspect, Paradigm and Programming-Language of CS.

Variables can only take in Words/Letters(Strings) or Values(Integers, Floats and Doubles).
 
that wont help cause i now how to use variables but i need a variable to declare to "-" ,"+","*"or"/"

Hi,

I don't think, in JavaScript, you can directly apply an operator as a value to a variable. May be you need to trick it in some way.

Can you explain why exactly you want to assign an operator as a value and what you want to achieve with it?

The question actually sounds interesting
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom