how to get width of inline elements js

JavaScript
<style>
span {
    display: inline-block ;
}
</style>
Source

Also in JavaScript: