User Interface Expert Question:
Download Questions PDF

Create a new javascript object with the keys of "fname" equal to your first name, "lname" equal to your last name, and "fcolors" equal to and array of 3 of your favorite colors. assign this object to a variable called "me" and log it to the console?

UI Developer Interview Question
UI Developer Interview Question

Answer:

var me = {"fname": "Global", "lname": "Guideline", "fcolors": ["blue", "green", "whitesmoke"]};
console.log(me);
// or
var me = {};
me.fname = "Global";
me.lname = "Guideline";
me.fcolors = ["blue", "green", "whitesmoke"];
console.log(me);

Download UI Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what JavaScript method would convert the string "20" to an integer (on the fly) so "20" + 20 = 40?How would we select the 3rd li element and retrieve the value of it's id attribute w/out selecting the li by id? *You can select it by index?

<ul id="list">
<li id="one"></li>
<li id="two"></li>
<li id="three"></li>
<li id="four"></li>
</ul>