Hexadecimal numbers are represented by a leading
0X or 0x followed by characters 0123456789ABCDEF.
Output
HelloWorld.js
var x = 0xFF; var y = 0XFF; console.log("x : " + x); console.log("y : " + y);
Output
x
: 255
y
: 255
If
the digits after 0x contains characters other than 0123456789ABCDEF,
SyntaxError is thrown.
No comments:
Post a Comment