isNaN

const element = document.getElementById(‘myBtn’); element.addEventListener(‘click’, myFunction); function myFunction() { const nan = document.getElementById(‘is-nan’).value; document.getElementById(‘nan-result’).innerHTML = isNaN(nan) isNaN method returns true if a value is Not-a-Numner Example OK

Canvas

The canvas element is a powerful tool for creating graphics and interactive visual elements directly in a web browser. It is a container for drawing graphics using JavaScript. Unlike traditional image elements, the canvas element is dynamic, allowing developers to draw, manipulate, and animate content programmatically. Key Features of HTML Canvas Drawing Shapes: You can…