Purchase Solution

Javascript

Not what you're looking for?

Ask Custom Question

Suppose the Javascript variables greeting and name have been declared as follows:

var greeting;
var name;

(a) Complete the table below to show the values of the variables after each line of the following code has been executed:

1. greeting = 'Hello';
2. name = 'Earthling';
3. greeting = greeting + name;

after line1: greeting: name
after line2: greeting: name
after line3: greeting: name

(b) Write a line of code to replace line 3 above which will create a greeting 'Hello Earthling!' with a space in between 'Hello' and 'Earthling' and an exclamation mark at the end.

Purchase this Solution

Solution Summary

The attached file contains the solution to the javascript problem, which is highlighted in blue.

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Networking Questions

This quiz consists of some basic networking questions.