Home »

How do you assign object properties?

Question ListCategory: JavascriptHow do you assign object properties?
jessica537 author asked 3 years ago
1 Answers
alisataylore190 author answered 3 years 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