answersLogoWhite

0


Best Answer

document.write("hello world");

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the correct JavaScript syntax to write Hello World?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a JavaScript program showing string concatenation?

There isn't much to it:---alert("Hello " + "world!");---'alert' creates a popup, and the + does string concatenation.See related link for a Javascript tutorial.


How do you do JavaScript?

Java script or javascript. a javascript is just object orientated language that you can embed into HTML to make an object preform tasks that are much much harder for any other language to do. On the other hand a complete Java script is much harder because pure Java is a language that is used to develope games and takes a lot more time to do than javascript, but it can do so much more than Javascript.


How do you call a perl program from javascript?

You can call the Script like this, <script type="text/javascript" src="perl_script.pl"></script> So you just replace a regular Javascript Call ( .js ) with the .pl Script. Inside the Perl Script you will have to use embraced Javascript Functions / Code, f.e. like print "document.write.('Hello World');";.


How do you add text to an already existing p tag in JavaScript or PHP?

Consider your HTML <p id="pid">Hello </p> In javascript document.getElementById('pid').innerHTML="world"; Remember "id" are unique on the HTML page hence js will always pick <p> where id=pid.


Hello world is the easiest thing to program on any device but what is its purpose?

"Hello World", is a simple computer prgram, mainly used to demonstrate and teach beginners the most basic syntax of programming languages. This is the first program that many people learn the basics of programming with, and is easily explained to novices.

Related questions

What is a method in JavaScript?

Hi there, a method is a "function" in a object. Example: function answers(){ this.world = function(){alert("hello world")}; } var hello = new answers(); hello.world(); <--- world is a method of the object hello.


The correct way to write Hello World in PHP is?

echo("hello world");


Write a JavaScript program showing string concatenation?

There isn't much to it:---alert("Hello " + "world!");---'alert' creates a popup, and the + does string concatenation.See related link for a Javascript tutorial.


Hello world program?

A "Hello world" program is usually the very first program you write when learning a new programming language, it simply prints out the text "Hello World". Below are a few examples: PHP: echo "Hello World"; _____________________________________ JavaScript: document.write("Hello World"); _____________________________________ Visual Basic: Module Hello Sub Main() MsgBox("Hello, World!") ' Display message on computer screen. End Sub End Module


How do you do JavaScript?

Java script or javascript. a javascript is just object orientated language that you can embed into HTML to make an object preform tasks that are much much harder for any other language to do. On the other hand a complete Java script is much harder because pure Java is a language that is used to develope games and takes a lot more time to do than javascript, but it can do so much more than Javascript.


How do you display message in php?

There are various ways of doing it. Here are a few examples: printf("Hello world!"); echo "Hello world!"; print "Hello world!"; If you are looking to offer a pop-up message (a separate window with a button that the user must click to acknowledge), you would have to do it with Javascript instead.


What are the basic syntax of c program?

You have to be more specific. What part of C syntax? Do you want the syntax for outputing a number or sentence, do you want to syntax for creating a array, struct, a user defined function or what? #include iostream using namespace std; int main { cout << "Hello World!" << endl; return 0; };


How do you call a perl program from javascript?

You can call the Script like this, <script type="text/javascript" src="perl_script.pl"></script> So you just replace a regular Javascript Call ( .js ) with the .pl Script. Inside the Perl Script you will have to use embraced Javascript Functions / Code, f.e. like print "document.write.('Hello World');";.


How do you write a program in c?

Writing a program in C is not a difficult task. You simply need to have a compiler or an editor supporting the syntax defined in the C Standard. An example of the "Hello, World!" program in C: #include <stdio.h> int main () { printf("Hello, World!"); return 0; }


What is hello world you speak German now in German?

"Hello World" is a common phrase used to demonstrate the basic syntax of a programming language. In German, you would say "Hallo Welt." The sentence "you speak German now" translates to "Du sprichst jetzt Deutsch."


How do you add text to an already existing p tag in JavaScript or PHP?

Consider your HTML <p id="pid">Hello </p> In javascript document.getElementById('pid').innerHTML="world"; Remember "id" are unique on the HTML page hence js will always pick <p> where id=pid.


Parse error expecting semicolon or comma in PHP file?

Most lines require a semi-colon and the end. It's likely that that line does. A parse error is an error in syntax so you need to add ; at the end of the line like so: