A
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 DarkMG73 on April 12th, 2020 in
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 DarkMG73 on April 12th, 2020 in
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 DarkMG73 on April 12th, 2020 in
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 DarkMG73 on April 11th, 2020 in
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 DarkMG73 on April 10th, 2020 in
ONE OBJECT TO RULE THEM ALL! OK, perhaps not "rule" them all, but certainly there is one object that makes it possible for near-total control of a web app. The Global Event Handlers Web API provides a globally-scoped object containing an assortment of event data from the document, Window or an HTML element. This can be user-interaction events, like clicking a button or moving to a different element, or programmatic changes, like a CSS animation that runs on page load. Notice of these events, as well as a large variety of important MORE q
By DarkMG73 on April 3rd, 2020 in