byte (Reserved word)

Reserved for future language enhancements.

A byte is a set of 8 adjacent binary digits (bits). It is big enough to hold an 8 bit character code, which will support the subset of 16 bit Unicode characters that most JavaScript users are likely to need, at least for developing scripts for use with the English language.

The least significant bit is called the low-order bit and the most significant bit is called the high-order bit. These do not necessarily map one to one to the bits stored in the memory of the computer, which may be big-endian or little-endian. This is thankfully hidden from the JavaScript programmer who will need to operate on a standardized IEEE-754 bit pattern when working with binary values stored in Numeric primitive values.

The fact that the ECMAScript standard (edition 2) reserves this word for future use, suggests that some byte level support is expected to be added to the language at some time in the future.

This keyword also represents a Java data type and the byte keyword allows for the potential extension of JavaScript interfaces to access Java applet parameters and return values.

See also:char, IEEE 754, LiveConnect, Reserved word

Cross-references:

ECMA 262 edition 2 - section - 7.4.3

ECMA 262 edition 3 - section - 7.5.3