Skip to content
Advertisement

How do i automate inserting variables into the given statement? [closed]

How do I insert random words in the content line below? for eg : I want to insert hey, hello, hi in

JavaScript

and it prints

JavaScript
JavaScript
JavaScript

Advertisement

Answer

Set value to the object by method myObj[property] = value;

JavaScript
Advertisement