- Home /
How to do a multiply?
Hello,
I have a simple question (i think) how do you perform a multiply. like 10x60 = 600 in a script javascript.
Did you even try to search for this once? First result for javascript multiply. http://www.w3schools.com/js/js_operators.asp
Basic operations are the same. I recommend you to start here: http://unity3d.com/learn/tutorials/modules/beginner/scripting
How to multiply is covered in the second lesson.
@GameVortex haha no i am not a beginner i have already the answer
Answer by Natsu_k · Jan 14, 2015 at 10:55 AM
As GameVortex suggested w3schools can give you a basic introduction to javascript. As for your question:
//Create a variable to store value
var x : int = 1;
//One way to multiply
x = 10 * 60;
//Another way
x *= 5;
//(x = x * 5)
Edit: regarding your comment, Unityscript is pretty much Javascript with classes, UnityScript vs JavaScript
Your answer
![](https://koobas.hobune.stream/wayback/20220613180407im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Error message: "Unexpected token *" javascript - wha? 1 Answer
Setting Scroll View Width GUILayout 1 Answer
Can someone help me fix my Javascript for Flickering Light? 6 Answers
Please help with skill point system javascript 1 Answer
lookat not updating my position(somebody out there has to know the answer) 1 Answer