Home »

How do you assign object properties?

Question ListCategory: JavascriptHow do you assign object properties?
jessica537 author asked 1 year ago
1 Answers
alisataylore190 author answered 11 months ago

obj[“age”] = 17 or obj.age How to make elements invisible ?
Change the “visibility” attribute of the style object associated with your element.

Remember that a hidden element still takes up space, use “display” to make the space

disappear as well.

if ( x == y) {

myElement.style.visibility = ‘visible’;

} else {

myElement.style.visibility = ‘hidden’;

}

Please login or Register to Submit Answer