answersLogoWhite

0


Best Answer

<html>

<head>

<script type="text/javascript">

function series()

{

var i=1

while(i<=10)

{

document.write(i+"<br>")

i=i+2

}

}

</script>

</head>

<body>

<form action="#" name=f1>

<input type=button value="generate series" onclick="series()">

</form>

<br><span id="outtab"></span>

</body>

</html>

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a JavaScript program to print first ten odd natural numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write a javascript program out of three no which one s greater?

1 2 3


How do you write a program that outputs a given characters in reverse?

write the javascript code to display the reverse no. of given no. (e.g. 247 reverse of 742)


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.


What is the difference between Javascript and Jquery?

JavaScript is a scripting language that is mainly used within a web browser. Jquery is a library of javascript code that can be used together with your javascript program. A set of functions that can preform common tasks is provided, which will reduce the amount of code that you have to write yourself.


How. to. write an. algorthim. to find the. sum of. first. 15 natural. numbers?

Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers


Write a program in Lex to eliminate white space and collect numbers as a token?

write a lex program to delete space from the program


How do you write a program to find out the square and cube of first ten natural numbers in gw basic?

First you will need to have some basic programming knowledge. You can use this to help make the program that is needed.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


How do you write a javascript?

go to notepad and write Javascript code and save it as .js and then import it into a page with a src tag


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


How do you write a program in objective c numbers 1-100 prime numbers?

fdsgfhgdfhgdf