[Solved] Javascript accessing nested properties of an object literal

The line el.setAttribute(key, [key]); tries to set the attribute to an array containing the key as its only entry (and thus will set href to “href” since the array will get coerced to string). You probably meant el.setAttribute(key, obj.att[key]); // ——————^^^^^^^ Live Example: function hoistNav() { const nav = []; nav[0] = {text: ‘HOME’, att: … Read more

[Solved] Creating a notification using javascript and do that when the server says so [closed]

There are a number of different things you could use. You should probably take a look at Node.js and websockets. Alternatively, you can check out some recent solutions, such as Angular.js (by Google) and Meteor. Good luck! 1 solved Creating a notification using javascript and do that when the server says so [closed]