Skill Test - Ui/UX

  • A closure is simply a function defined within another function. However, the power of closures is derived from the fact that the inner function remembers the environment in which it was created. In other words, the inner function has access to the outer function’s variables and parameters even outer function has finished execution Was the candidate able to answer
  • Ans: Local scope and Global Scope Was the candidate able to answer
  • Ans: ‘let’ stands for block scope local variable. let allows you to declare variables that are limited in scope to the block, statement, or expression on which it is used. This is unlike the var keyword, which defines a variable globally, or locally to an entire function regardless of block scope. Was the candidate able to answer
  • Ans: All variable declarations are hoisted (lifted and declared) to the top of the function, if defined in a function, or the top of the global context, if outside a function. It is important to know that only variable declarations are hoisted to the top, not variable initialization or assignments (when the variable is assigned a value). Was the candidate able to answer
  • Ans: document.ready() function is different from body onload() function for 2 reasons. • We can have more than one document.ready() function in a page where we can have only one body onload function. • document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page. Was the candidate able to answer
  • Ans: document.ready() function is different from body onload() function for 2 reasons. • We can have more than one document.ready() function in a page where we can have only one body onload function. • document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page Was the candidate able to answer
  • Ans: Using jQuery length property, we can ensure whether element exists or not. Was the candidate able to answer
  • Ans: hasClass API can find if an element has a class attribute or not Was the candidate able to answer
  • Ans: is(‘:hidden’) API can find if an element is hidden or not Was the candidate able to answer
  • Please provide your detailed comments.
  • Please copy and paste the "Go to Entry" field from the applicants original email.