If you like the content on this blog, please make sure to subscribe. When you subscribe, you’ll get emailed each time I post here.

Latest posts

  • Wait X milliseconds in JavaScript

    In many programming languages, such as C, Python, and Java, there exist functions that allow you to postpone execution of code for a specified number of seconds or milliseconds. These functions usually go by names such as sleep(). Unfortunately, in JavaScript, there is no built-in function that can do this. Luckily, by making use of […]

  • Verify a user’s age with HTML and JavaScript

    Verify a user’s age with HTML and JavaScript

    To sign up to many websites, you must meet a certain age requirement. To acquire a Google account, for example, you must be at least 13 years old. In the case you enter a birthdate that indicates you do not meet the age requirement for Google, you will be informed that you do not meet the requirement and Google will refuse to continue with registration. Some other websites such as Twitter are more relaxed. While requiring its users to be at least 13, Twitter does not ask you for your birthdate. So in theory a 12 year old could sign up on Twitter and use it, so long as they do not declare anywhere that they are not at least 13. Nevertheless, checking someone’s birthday is a good way of ensuring they meet the age requirement. While a user can lie about their birthday, it’s a good first step to ensuring your website or app is compliant with privacy laws.

  • Simple calculator program with HTML and JavaScript

    Simple calculator program with HTML and JavaScript

    In this article, I will be walking through how to write a simple calculator with HTML and JavaScript. This calculator will take two numbers and allow the user to choose from four buttons (add, subtract, multiply, and divide) on what they would like to do with them. The answer is given via a popup box.

Create your website with WordPress.com
Get started