58.9k views
2 votes
What is the output of this code segment?

var phrase = "I am so";
var emotion = "excited";
var sentence = phrase + " " + emotion.toUpperCase() + "!";
console.log(sentence);

2 Answers

5 votes
Hi!

The output of this JavaScript code is:

I am so EXCITED!
User HieroB
by
7.5k points
3 votes

Answer:

i am so EXCITED.

Step-by-step explanation:

this program contains two variables

i.e

var phrase = "I am so";

var emotion = "excited";

the output for this program

is var sentence = phrase + " " + emotion.toUpperCase() + "!";

console.log(sentence);

which is combination of two phrases i.e var phrase and emotion phrase in capital letters(upper case)


User GeckoSEO
by
7.9k points