<HTML>
<HEAD>
<TITLE>TMA 02 Q4(ii)</TITLE>
<SCRIPT LANGUAGE = "JAVASCRIPT">
var loc;
var weather;
var name;
loc = window.prompt('Please enter your location','');
weather = window.prompt(`Please enter the weather`,``);
name = window.prompt(`Please enter your name`,``);
document.write(`London`;` Snowing`;` Meriam`);
document.write(`<BR>` + `See you soon`)
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
Meriam
0
Newbie Poster
Recommended Answers
Jump to PostIs it correct?
No!
a.) To delimit the strings you can use either DOUBLE QUOTES (") OR APOSTROPHES('). You are using the backtick(`) which is NOT correct
b.) On the document.write() you need to separate different string using a comma(,) NOT a semicolon( ; )
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.