Created
February 28, 2018 10:39
-
-
Save haingdc/57be034864214ef03abe8ec9e2fa5e26 to your computer and use it in GitHub Desktop.
A Gentle Introduction to Functional JavaScript: Part 2
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 = ['unicorn', 'fairy', 'kitten']; | |
// elements sẽ chứa các phần tử DOM | |
var elements = []; | |
for (var i = 0; i < ids.length; i = i + 1) { | |
elements[i] = document.getElementById(ids[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment