Dodo
Dodo

Reputation: 113

Javascript variable type (byte)

I searched for javascript byte type variables and I can't find byte type variable???

Thanks.

Upvotes: 11

Views: 52274

Answers (3)

morsanu
morsanu

Reputation: 985

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

Upvotes: 12

Pacerier
Pacerier

Reputation: 89743

JavaScript now supports raw binary data types (byte).

Look into ArrayBuffer.

Upvotes: 13

scribblemaniac
scribblemaniac

Reputation: 6869

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.

Upvotes: -3

Related Questions