함수형 프로그래밍에서 함수는 순수 함수순수 함수 (Pure function)부수 효과 X (Side effects)인자에 대응하는 결과값이 항상 같다순수 함수가 아닌 경우1\. 외부 상태 변경에 의해 결과값이 달라지는 경우만약 a가 상수라면..외부 상태값 a가 변경될
객체지향과 함수형 프로그래밍의 차이는 객체를 기준으로 하냐 함수를 기준으로 프로그램이 동작하느냐...객체지향 프로그래밍에서는 객체 인스턴스의 원본인 클래스에 메서드들을 정의해서 해당 클래스의 인스턴스 객체들에 딸린 메서드들이 같은 동작을 한다.그러나 함수형 프로그래밍에
배열이든 유사배열이든 상관없이 순회하는 순수함수 querySelector는 배열이 아닌 NodeList를 리턴하게 된다. 이 NodeList는 배열이 아니므로 map 메서드를 갖고 있지 않다. 이게 객체지향과 함수형 프로그래밍이 다른 부분이다. 객체지향에서 메서드