开发者

Javascript variable type (byte)

开发者 https://www.devze.com 2022-12-14 16:05 出处:网络
I searched for javascript byte type variables and I can\'t find byte type variab开发者_如何学Gole???

I searched for javascript byte type variables and I can't find byte type variab开发者_如何学Gole???

Thanks.


There is no byte predefined type in javascript.

click this link for Javascript types, detailed

the above link is dead, here's a new one


JavaScript now supports raw binary data types (byte).

Look into ArrayBuffer.


I think this is what you want:

var x = "A String"
var y = 42
alert("var x is " + typeof(x))
alert("var y is " + typeof(y))

This uses the javascript typeof() operator to detect what kind of type is variable x and y.

0

精彩评论

暂无评论...
验证码 换一张
取 消