본문 바로가기

Python_WEB/JavaScript

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

반응형

/ = 연산자는 변수를 다른 숫자로 나눕니다.

 

myVar = myVar / 5;

 

 

myVar를 5로 나눕니다.

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

 

myVar /= 5;

 

Q>

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

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

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

4. c는 3과 같아야합니다.

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

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

 

A>

var a = 48;
var b = 108;
var c = 33;

// Only change code below this line
a /= 12;
b /= 4;
c /= 11;

 

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

 

반응형