- Home /
 
               Question by 
               QuestionBro · Mar 21, 2011 at 04:23 AM · 
                javascriptfloatintconverttypecasting  
              
 
              Javascript int to float
 //what do?
 
                myInt = (int)myFloat;
  myInt = do int stuff with it yo because I need an int not a damn float; 
is there a way to caste variables like in c# in javascript? I am having trouble getting this to work, and I am thinking it is some retarded slight syntax difference I am forgetting.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Eric5h5 · Mar 21, 2011 at 04:36 AM
var aFloat = 5.0;
var anInt : int = aFloat;
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                