JavaScript DataView.getInt16() methodThe JavaScript DataView.getInt16() is an inbuilt method in dataView. It is used to get a signed 16-bit integer(short) number at a specified location. NOTE: Range of 16-bit integer value is from 0 and 65,535 for unsigned and from ?32,768 to 32,767 for signed integer value.SyntaxParametersbyteoffset: The offset, in a byte, from the start of the view where to read the data. Return valueThis method returns a signed 16-bit integer number. Browser Support
Example 1Test it NowOutput: If we give a float value then output will be an Integer 3 Example 2Test it NowOutput: If there is no data to be stored, then Output will Be: 0 Example 3Test it NowOutput: PI value will be 3 Example 4Test it NowOutput: If we provide Integer value then output will be. 7 Next TopicJavaScript DataView |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India