Element: getBoundingClientRect() method
Returns size of an element and its position relative to the viewport.
2 Size Properties — width and height —
8 Position Properties— left, top, right, bottom, x, y.
Basically the above 8 properties describe a rectangle in pixels.
The properties other than width and height are relative to the top-left of the viewport.
#javascript #react #interview #india #software #frontend #frontenddeveloper #machinecoding #webdevelopment #js #react #reactjs #faang #html #html5 #css #css3 #domapi #dom