Skip to main content

Color Flipper Project


About Project

On clicking click Me Button body background color,h1 color and rgb demontration of the color should be shown and if background is dark h1 background should be white and and body background is light  h1 background should be black. 


Hosted project

https://codeekta28.github.io/color-flipper/

Github Source File

https://github.com/codeekta28/color-flipper.git

javascript used

- DOM

- function

- textContent

- Destructuring of Array

- if-else

- Event

Lines Of Code
26 lines of code

 Challenges Faced
As i have done it before so it was not much of a challenge but i really liked background white and black switching situation

New Things Learned or refreshed
We can return two values in function in the form of Array and then use it by destructuring and you can select entire body using document.body

Biggest Takeaway
functions can return more than 1 values using array  and use desturture to assign value inside array to variable

Comments

Popular posts from this blog

Javascript Projects

 1. Review Card Project 2 .Color Flipper Project 3. Random Funny Code Quotes Project 4. Counter 5 .Image Slider