From Nightfox@DIGDIST to All on Thursday, September 17, 2015 20:02:22
I just saw this JavaScript tip on w3schools.com: ---------------------------------------------------
Avoid new Array()
There is no need to use the JavaScript's built-in array constructor new Array().
Use [] instead.
These two different statements both create a new empty array named points:
var points = new Array(); // Bad
var points = []; // Good ---------------------------------------------------
Does anyone know why using 'new Array()' is considered bad?
Nightfox
---
þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
From Nightfox@DIGDIST/BATTLEST/FREEWAY to All on Thursday, September 17, 2015 20:02:00
I just saw this JavaScript tip on w3schools.com: ---------------------------------------------------
Avoid new Array()
There is no need to use the JavaScript's built-in array constructor new Array().
Use [] instead.
These two different statements both create a new empty array named points:
var points = new Array(); // Bad
var points = []; // Good ---------------------------------------------------
Does anyone know why using 'new Array()' is considered bad?
Nightfox
---
þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
Who's Online
Recent Visitors
Elija Barnes
Sunday, March 01, 2026 20:14:37
from
Fairborne, Tx
via
HTTPS
Elija Barnes
Saturday, February 28, 2026 19:09:25
from
Fairborne, Tx
via
HTTPS
George H
Friday, February 27, 2026 12:17:56
from
Buffolo, Ny
via
HTTPS
George H
Monday, February 23, 2026 23:12:08
from
Buffolo, Ny
via
HTTPS
Elija Barnes
Monday, February 23, 2026 23:05:47
from
Fairborne, Tx
via
HTTPS
Jim Bob
Monday, February 23, 2026 22:53:59
from
Idaho
via
HTTPS