본문 바로가기

Python_WEB/JavaScript

[freecodecamp]JavaScript 숫자 늘리기

반응형

++ 연산자를 사용하여 쉽게 증가하거나 변수에 추가 할 수 있습니다.

 

i ++;

 

다음과 같습니다.

 

i = i + 1;

 

전체 행이 i ++;가되어 등호가 필요하지 않습니다.

 

Q>

1. myVar에서 ++ 연산자를 사용하도록 코드를 변경하십시오.

2. myVar는 88이어야합니다.

3. 할당 연산자를 사용하면 안됩니다.

4. ++ 연산자를 사용해야합니다.

5. 지정된 주석 위의 코드를 변경해서는 안됩니다.

 

A>

var myVar = 87;

// Only change code below this line
myVar++;

 

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

 

반응형