Skip to content
Akin C edited this page May 5, 2019 · 6 revisions

Welcome to the Javascript-new-agnostic wiki!

This repository is part of a larger project!

◀️ PREVIOUS PROJECT| NEXT PROJECT ▶️


The keyword new could be used to execute a constructor function.

Forgetting keyword new should not lead to an error unless strict mode is used. The result using no strict mode would be global variables if those are instanced with this.

Also an alternative could be used as found in the file "new.js" within the function alternative.

Content

The user interaction part should look like the content as seen below by starting "index.html" in a web browser.

ERROR: No image found!

  • 🅱️ utton "NO STRICT" should show what could happen if keyword new is forgotten.
  • 🅱️ utton "STRICT" should show an error within the chrome`s console.
  • 🅱️ utton "ALTERNATIVE" should show a way how to catch a situation when forgetting the keyword new.

To use the project just download the files and execute "index.html". Note that all files(folder "wiki_images" excluded) should be placed in the same folder so that the functionality of the code is guaranteed.

Clone this wiki locally