Created
February 1, 2019 14:32
-
-
Save EvanGertis/8f7143a6bb4f44b85a9ebd2652f4efc5 to your computer and use it in GitHub Desktop.
javascript square function
This file contains 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
function square(UI_body, width, height, color){ | |
let square = document.createElement('div'); | |
square.style.width = width; | |
square.style.height = height; | |
square.style.margin = "2px 2px 2px 2px"; | |
square.style.backgroundColor = color; | |
UI_body.append(square); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment