# Some JavaScript Basic Syntax

## Math 오브젝트 활용

`Math.pow(3,2)` -&gt; 9

`Math.round(10.6)` -&gt; 11

`Math.ceil(10.2)` -&gt; 11

`Math.floor(10.2)` \-&gt; 10

`Math.random()` -&gt; 0~1 random number

`Math.round(100*Math.random())` -&gt; 1~100 random number

---

## 문자의 표현 To escape well in single quote -&gt; use \\

`alert('seongjin\'s coding');`

문자 안에 ' 기호를 추가할 때는 역슬래시

## To make a enter in JavaScript without using enter key

`\n`

## 문자에 대한 명령 Command for text

`"cod"+"ing"`

문자열과 문자열은 +로 합칠 수 있다.

you can combine two strings with +

`"code".indexOf("e") -> 3`

각 문자열의 위치를 배열처럼 출력도 가능하다.

you can print each index of the string using .indexOf()
