Created
March 13, 2018 04:53
-
-
Save haingdc/ecef7920191d4c504035ea3a146d9aee to your computer and use it in GitHub Desktop.
A Gentle Introduction to Functional JavaScript: Part 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ids = ['DEE', 'DUM']; | |
// (chưa cần hiểu bind vội) Mục đích là để thu được các thẻ DOM có id là “DEE”, “DUM” | |
var elements = map(document.getElementById.bind(document), ids); | |
// thêm tên class cho các thẻ DOM thu được | |
map(addClass, elements); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment