Variable- variables are termed as containers and we can place data into these containers and then, we can use these containers data by simply naming the container.
we can create a variable using javascript keyword var
Syntax:
var <variable name> = "some data";
e.g.
var myvariable="Welcome to JavaScript";
e.g.
Related Topics:
we can create a variable using javascript keyword var
Syntax:
var <variable name> = "some data";
e.g.
var myvariable="Welcome to JavaScript";
e.g.
<html>
<head>
<title>My first web page</Title>
<Script language="JavaScript">
var firstname="My";
var secondname="Teacher";
document.write(firstname + " " + secondname);
</Script>
</head>
<body>
</body>
</html>
Output: My TeacherRelated Topics:
- JavaScript Introduction
- Variables in JavaScript
- JavaScript Function
- Accessing JavaScript Function
- Creating JavaScript interactive form
- Accessing form field value
- Creating interactive form login webpage
- Networking Fundamentals
- TCP/IP and Internet addressing
- Internet Working
- Internet Working Servers
- Concept and need for web publishing
- Web languages
- Javascript Control Structure
- Checking Text is Letter/s
- Checking Text is Number/s
- Checking Textbox is Empty or not
- Addition of two numbers
- Subtraction of two numbers
- Multiplication of two numbers
- Division of two numbers
- Form field validations
- Email validation