Date and Time in Javascript

The Date() object provides the number of seconds from January 1970 UTC up to the moment it is invoked. The parameters of the function allow for formatting of the output.. .toLocaleTimeString(), .toLocaleDateString() and .toLocaleString() are   MORE q

By on April 13th, 2020 in

Classes in JavaScript

Classes are blueprints to create Objects. When a class is set up with all of the properties and functions for the object, this class can then be used to create any number of identical Objects. Important notes on classes : It is common to capitalize the first letter of the class name to make clear it is a class and  MORE q

By on April 12th, 2020 in

Literals in JavaScript

Literal in programming: In computer science, a literal is a notation for representing a fixed value in source code. In JavaScript, it would be closed by { } or [ ]. Object Literal: This would be closed by { } and have a key(String or Number) and a value (any type) separated by a colon with each entry   MORE q

By on April 12th, 2020 in

Forms & Validation

It is a good idea to perform basic tests on user-inputted data before sending it to the server just to make sure it meets basic standards. This is not, in any way, a substitute for actual security tests that must be performed on the server before consuming the data. Any code running in the browser can be altered, so truly protecting the server from malicious code sent via form data can only be done away from the  MORE q

By on April 12th, 2020 in

Arrays in Javascript

Arrays in JavaScript are versatile structures for storing various data types, indexed from zero. They allow for creation through methods or literal expressions and support numerous properties and methods for manipulation and data retrieval. Common operations include adding, removing, and accessing elements, as well as merging arrays without altering originals.  MORE q

By on April 11th, 2020 in

Variables in JavaScript

Variables in JavaScript are basically names or references to storage locations in memory. A variable name needs to start with a letter (lowercase is most common, though uppercase can be used), an underscore( _ ) or dollar sign( $ ). Variables will be either local, which means they are only accessible within a function or brackets, or global, which means they are accessible anywhere. Variable Declarations var - scoped globally. const - block scoped by curly brackets {} and unchangeable. let - block scoped and changeable. The last option is  MORE q

By on April 10th, 2020 in

Events in JavaScript

While Global Event Handlers are actually a Web API, accessing these events are central to Javascript's usefulness. These events mark points of interaction from the user or programmatic changes to the document. All of this can be harnessed via JavaScript to provide both functional and visual manipulations that create a   MORE q

By on April 3rd, 2020 in

JS Shortcuts

Here I look at the use of compound assignment operators, allowing concise math operations. It provides examples, such as x += y, which simplifies expressions. Additionally, it introduces the modulus operator for finding remainders and checking even or odd numbers. Post-increment and pre-increment operators are also described for variable evaluation timing.  MORE q

By on April 3rd, 2020 in

Post Navigation