JS Javascript string to number transform

 

var voteTimes = Number('12');  //int 12
var voteTimes = Number('12.12');  //int 12.12