update README for JavaScript

This commit is contained in:
2024-04-28 00:18:39 +03:00
parent 3581b1f8a3
commit 3c5f55f5f6
13 changed files with 24 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
function Draw() {
let context = document.getElementById('canvas').getContext('2d');
// Styling text
// font = value
// textAlign = value | *start, end, left, right, center
// textBaseline = value | top, hanging, middle, *alphabetic, ideographic, bottom
// direction = value | ltr, rtl, *inherit
// fillText(text, x, y [, maxWidth])
// strokeText(text, x, y [, maxWidth])
context.font = '48px serif';
context.fillText('Hello world', 10, 50);
}