context fill text get width of text

Solutions on MaxInterview for context fill text get width of text by the best coders in the world

showing results for - "context fill text get width of text"
Lea
14 Aug 2017
1ctx.font = '14px serif';
2var txt="Hello World";
3ctx.measureText(txt).width;