본문 바로가기

Python_WEB/JavaScript

[freecodecamp]JavaScript 복합 대입 연산자 *=

반응형

*= 연산자는 변수에 숫자를 곱합니다.

 

myVar = myVar * 5;

 

myVar에 5를 곱합니다.

다음과 같이 다시 작성할 수 있습니다.

 

myVar *= 5;

 

Q>

1. *= 연산자를 사용하도록 a, b 및 c에 대한 할당을 변환합니다.

2. a는 25와 같아야합니다.

3. b는 36이어야합니다.

4. c는 46이어야합니다.

5. 각 변수에 * = 연산자를 사용해야합니다.

6. 지정된 주석 위의 코드를 수정해서는 안됩니다.

 

A>

var a = 5;
var b = 12;
var c = 4.6;

// Only change code below this line
a *= 5;
b *= 3;
c *= 10;

 

https://www.freecodecamp.org/

 

freeCodeCamp.org

Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.

www.freecodecamp.org

 

반응형