[ v] Followed guidelines mentioned in the readme file.
[ v] Followed directory structure. (e.g. ProjectName/{USERNAME}/...yourfiles)
[ v] Starred ⭐ the Repo (Optional)
Summary
I used JavaScript DOM Manipulation to perform this task.
first i created a container and styled everything by setting up off bulb image and toggle button svgs
then i creating an onclick event for the button.
which triggers the ToggleBulb() function
the function stores the image source in a variable Bulb and then compares it using match operator to know whether the image is of bulb on or bulb off and then changes the source using setAttribute accordingly.
Developer Checklist
Summary
I used JavaScript DOM Manipulation to perform this task.
first i created a container and styled everything by setting up off bulb image and toggle button svgs then i creating an onclick event for the button. which triggers the ToggleBulb() function the function stores the image source in a variable Bulb and then compares it using match operator to know whether the image is of bulb on or bulb off and then changes the source using setAttribute accordingly.
Screenshot
attach screenshots/gifs here
Live Project Link
add a working project link here
https://bulb-on-off-js-miniproject-2k5y1sno4-lakshyamalik.vercel.app/