Found 601 Articles for Front End Scripts

Date. toJSON() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 11:51:17

181 Views

The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below.Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields of the object, using either local time or UTC (universal, or GMT) time.The toJSON() function of the date object returns the simplified extended ISO format of the date.SyntaxIts Syntax is as followsdateObj.toJSON();Example Live Demo    JavaScript Example       ... Read More

Date.toISOString() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 11:51:40

143 Views

The Date object is a datatype built into the JavaScript language. Date objects are created with the new Date( ) as shown below.Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields of the object, using either local time or UTC (universal, or GMT) time.The toISOString() function of the date object returns the simplified extended ISO format of the date.SyntaxIts Syntax is as followsdateObj.toISOString();Example Live Demo    JavaScript Example         ... Read More

Date.getUTCMilliseconds() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 11:36:41

30 Views

The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below.Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields of the object, using either local time or UTC (universal, or GMT) time.The getUTCMilliseconds() function of the Date object returns the milliseconds in the given date according to the universal time.SyntaxIts Syntax is as followsdateObj.getUTCMilliseconds();Example Live Demo    JavaScript Example ... Read More

Date.getUTCDay() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 11:38:48

22 Views

The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below.Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields of the object, using either local time or UTC (universal, or GMT) time.The getUTCDay() function of the Date object returns the day of the week of its current date according to the universal time. (0 represents Sunday and so on...)SyntaxIts Syntax is ... Read More

Date.now() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 10:33:22

191 Views

The Date object is a data type built into the JavaScript language. Date objects are created with the new Date( ) as shown below.Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields of the object, using either local time or UTC (universal, or GMT) time.The now() function of the Date object returns the number of milliseconds since 1st Jan 1970.SyntaxIts syntax is as followsDate.now();Example Live Demo    JavaScript Example       ... Read More

DataView.setUint32() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 10:22:03

32 Views

The setUint32() function of the DataView stores an unsigned 32-bit integer at the specified position.SyntaxIts syntax is as followsdataView.setUint32();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setUint32(1, 45544);       document.write(dataView.getUint32(1));     Output45544ExampleTo this function you cannot pass float value, if you try to do so it is considered as integer value. Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new ... Read More

DataView.setUint16() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 10:22:51

40 Views

The setUint16() function of the DataView stores an unsigned 16-bit integer at the specified position.SyntaxIts syntax is as followsdataView.setUint16();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setUint16(1, 45544);       document.write(dataView.getUint16(1));     Output45544ExampleTo this function you cannot pass float value, if you try to do so it is considered as integer value. Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new ... Read More

DataView.setInt8() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 10:23:25

25 Views

The setInt8() function of the DataView stores a signed 8-bit floating point number at the specified position.SyntaxIts syntax is as followsdataView.setInt8();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setInt8(1, 362);       document.write(dataView.getInt8(1));     Output106ExampleTo this function you cannot pass float value, if you try to do so it is considered as integer value. Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView ... Read More

DataView.setInt32() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 10:24:25

25 Views

The setInt32() function of the DataView stores a signed 32-bit integer at the specified position.SyntaxIts syntax is as followsdataView.setInt32();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setInt32(1, 36274722);       document.write(dataView.getInt32(1));     Output36274722ExampleTo this function you cannot pass float value, if you try to do so it is considered as integer value. Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new ... Read More

DataView.setInt16() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 10:25:08

26 Views

The setInt16() function of the DataView stores a signed 16-bit integer at the specified position.SyntaxIts syntax is as followsdataView.setInt16();Example Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new DataView(arrayBuffer);       dataView.setInt16(1, 3225);       document.write(dataView.getInt16(1));     Output3225ExampleTo this function you cannot pass float value, if you try to do so it is considered as integer value. Live Demo    JavaScript Example           var arrayBuffer = new ArrayBuffer(20);       var dataView = new ... Read More

Advertisements