Live coding a dice game of 21 in JavaScript with HTML, CSS and ESM modules

Опубликовано: 20 Октябрь 2024
на канале: Mikael Roos
612
7

This live coding and example program shows how to create a small application in vanilla JavaScript using techiques like:

HTML, CSS, JavaScript
ESM modules and classes
Structure in HTML
Connect with events and eventhandlers
Update and modify the DOM

The example code is in the repo: https://gitlab.com/mikael-roos/html-c...

00:00:00 Prepare the boilerplate for HTML, CSS, JavaScript
00:04:20 The HTML Graphical User Interface
00:08:52 The Dice class
00:14:00 The Player class
00:24:54 A graphical dice using UTF-8 characters
00:28:25 Start play the game
00:44:53 Computer roll the dices and winner announced
01:05:43 npm run lint