---
title: "将字符串转成数字的几种方式"
author: "zhouyrt"
date: "2010-05-10T15:33:37Z"
tags: []
categories: ["Web前端"]
slug: "untitled"
draft: false
lastmod: "2010-08-17T13:13:39Z"
id: 663085
url: "https://snandy.iteye.com/blog/663085"
---

见以下代码：

 

```
typeof Number('44.5');
typeof parseInt('44.5');
typeof parseFloat('44.5');
typeof ('44.5'-0);
typeof +'44.5';
typeof ('44.5'*1);
typeof ~~'44.5';//http://james.padolsey.com/javascript/double-bitwise-not/
typeof '44.5'|0
```

 

还有其它的吗？