Jump to content

Need help fixing up code (JavaScript)

Davisrox101
Go to solution Solved by Hazy125,

As far as I can see, that code works exactly when I tested it. Only problems are the lack of spaces around the name on the alert. So my guess is JavaScript is currently disabled on your browser. Usually this isn't the case, but you might have accidentally checked a box in Chrome or you're using Internet Explorer which has an annoying habit of randomly blocking JavaScript when it feels like it

<body> <script type="text/JavaScript">var name = prompt("What is your name?",0); alert("Hi"+ name + "Hope you are enjoying JavaScript");</script> </body>

For some reason the prompts are not coming up

 

By the way I am a beginner programmer and don't know a lot about JavaScript

The long haired pure bred dachshund called Davis

Link to comment
Share on other sites

Link to post
Share on other sites

As far as I can see, that code works exactly when I tested it. Only problems are the lack of spaces around the name on the alert. So my guess is JavaScript is currently disabled on your browser. Usually this isn't the case, but you might have accidentally checked a box in Chrome or you're using Internet Explorer which has an annoying habit of randomly blocking JavaScript when it feels like it

I am good at computer

Spoiler

Motherboard: Gigabyte G1 sniper 3 | CPU: Intel 3770k @5.1Ghz | RAM: 32Gb G.Skill Ripjaws X @1600Mhz | Graphics card: EVGA 980 Ti SC | HDD: Seagate barracuda 3298534883327.74B + Samsung OEM 5400rpm drive + Seatgate barracude 2TB | PSU: Cougar CMX 1200w | CPU cooler: Custom loop

Link to comment
Share on other sites

Link to post
Share on other sites

It works, the code tag actually fixed the problem

The long haired pure bred dachshund called Davis

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×