get the device width in javascript code example
Example 1: get screen width javascript
window.screen.width
//or just
screen.width
Example 2: device width js
window.screen.availWidth
window.screen.width
//or just
screen.width
window.screen.availWidth