JavaScript Variable Mutation & Type Coercion

JavaScript Variable Mutation & Type Coercion

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

Give a example of variable mutation

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

7 years ago

Date created

Mar 1, 2020

Cards (5)

Section 1

(5 cards)

Give a example of variable mutation

Front

var nickAge = 23; nickAge = 'Twenty Three'; The data type of the variable was changed from a number to a string

Back

Give a example of Type coercion

Front

var firstName = 'Nick'; var age = 23; console.log(firstName + ' ' + age);

Back

Can you declare many variables on one line

Front

Yes, this is a common practice.

Back

What is variable mutation?

Front

to change the value of a variable

Back

What is JavaScript type coercion?

Front

JavaScript automatically converts data types from on to another as needed.

Back