Change string to upper case with Javascript

Change string to upper case with Javascript

In this article I will show you how to create a string object and then turn the entire string inside that object to uppercase letters using javascript. Our first step is to create a string object with this code.

var gadgets = new String(“This blog is about web development and internet!”);

then in order to turn the entire string above to uppercase and print it out on screen, all you need is this simple code.

var upperTxt = gadgets.toUpperCase();
document.write(upperTxt);

now browse to this article with your Firefox browser and you should see this.

The entire code is as follow, try it and see it in action.

<script type=”text/javascript”>
var gadgets = new String(“This blog is about web development and internet!”);
var upperTxt = gadgets.toUpperCase();
document.write(upperTxt);
</script>

Next Page :

How to use Java Scanner Class

This article will show you how to use Java Scanner Class with simple Java code.

Show text on JFrame with Java program

Show text on JFrame with Java program!

The if…else statement in Java program

‘The if…else statement in Java program’ article will show you an example to use the statement.

Java Scanner Class

Java Scanner class tutorial will show you how to create an instance of the scanner class and read in the input from the user then print out the sum of those inputs.

Creating and Using Interfaces in Java Program

Creating and Using Interfaces in Java Program will show you how to write simple java program using Interfaces.

Create a simple Java method

An article about how to create a simple Java method.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>