Published Jul 16 2012
Psssst! The 2023 WEB DEVELOPMENT BOOTCAMP is starting on FEBRUARY 01, 2023! SIGNUPS ARE NOW OPEN to this 10-weeks cohort course. Learn the fundamentals, HTML, CSS, JS, Tailwind, React, Next.js and much more! ✨
new Object(). Use the object literal syntax
whilestatements condition part
eval. Why? It has performance issues (it runs the interpreter/compiler), it has security issues (code injection if used with user input), difficulties in debugging.
with, as it modifies the scope chain and can be a source of confusion.
Arrayas an associative arrays, use
Objectinstead. The part of the
Arrayobject that provides that functionality is in fact provided by the
Objectprototype, so you could really have used a
Dateobject for that same thing.
\at the end of a string to create a multiline string, it’s not part of ECMAScript. Use string concatenation
' string1 ' + ' string2 'instead
Array. Modify other prototypes of other objects such as
Functionwith caution as it could lead to bugs hard to debug.