1. Ajax (Asynchronous JavaScript and XML)

어떠한 행동을 실행하는 중에도 다른 행동을 할 수 있음

  1. JSON (JavaScript Object Notation)

클라이언트(요청하는 컴퓨터)와 서버(응답하는 컴퓨터) 간의 데이터 교환 규칙

{
  "name": "Lee",
  "gender": "male",
  "age": 20,
  "alive": true
}
// 키는 반드시 큰따옴표(작은따옴표 사용불가)로 둘러싸야 한다.

2.1 JSON.stringify

JSON.stringify 메소드는 객체를 JSON 형식의 문자열로 변환한다.

const o = { name: 'Lee', gender: 'male', age: 20 };

// 객체 => JSON 형식의 문자열
const strObject = JSON.stringify(o);
console.log(typeof strObject, strObject);
// string {"name":"Lee","gender":"male","age":20}