Ask coding questions

← Back to all posts
Javascript Error which I don't understand so please help me.
BooleanBean (3)

So I have a bookmarklet, which is like a morsel of JS that you run in the browser, and I have been editing it for a project. I am using setTimeout(); to help me, but it comes back with a TypeError. Let me show you.
The code:
prompt('You are Egg Head, the most intelligent man in the world, and you live in TechTopia, a browser world where people live in the Inspect function of the window. A boy is about to shut his laptop, because it is lagging so much. The only way you can stop this is if you get into your rocket, and destroy all thespace-junkon the website. Try to get it completely clear. '); document.createTextNode('HI THERE!'); var KICKASSVERSION='3.0'; var s = document.createElement('script'); s.type='text/javascript'; document.body.appendChild(s); s.src='//'; void(1); setTimeout(90000); alert('Thine time is up');

The error:
TypeError: Cannot create property '__wrapper_19__' on number '90000'

Also the document.createTextNode(); thing doesn't work.
It would be nice of you to help.
Thanks a lot,


xfinnbar (21)

Create either a HTML repl, node.js repl or deno repl. Java =/= JavaScript.

ch1ck3n (1616)

javascript is not the same as java

BooleanBean (3)

@ch1ck3n whatever the inspect one is

ch1ck3n (1616)

@BooleanBean javascript is the "inspect one"

BooleanBean (3)

BTW, its the js that is used in HTML5 or the Inspect(ctrl+shift+i) function in the browser.