Process

Calculator

The assignment statement used for processing in JavaScript is the = (equals) symbol. Type the following code that shows the use of = within a program.

Note: make sure that you type the program in exactly because JavaScript is case sensitive

<html>

<head>

<script type='text/javascript'>

var forename = ' ' ;

var surname = ' ' ;

var fullname = ' ' ;

forename = prompt ('What is your first name?');

surname = prompt ('What is your last name?');

fullname = forename + ' ' + surname; // This is the processing part of the program

alert ('Hello ' + fullname);

</script>

</head>

<body>

</body>

</html>

Next: Output