// call , apply, bind //1. How to use bind() feature in javascript with example let button = function(content) { this.content = content; }; button.prototype.click = function() { console.log(`${this.content} clicked `); }; let newbtn = new button('add'); let boundclick = newbtn.click.bind(newbtn); boundclick(); //2. bind() using async funs let myobj = { asyncGet(cb) { cb(); }, parse() { console.log('parse called'); }, render() { this.asyncGet(function() { this.parse(); }.bind(this)) } }; myobj.render(); // ----------------------------JS Coding Test------------------------------------ //1. What does the following statement declares? var myArray = [ [ [] ] ]; // A. 3 dimension array //2.Question: What value is returned from the above statement? var test = "i'm a lasagna hog".split("").reverse().join(""); //Answer: "goh angasal a m'i" //3. What is returned ?
1. Can you describe your workflow when you create a web page? 2. Name 3 ways to decrease page load. (perceived or actual load time) 3. Explain few Common Security Issues with Ajax. or limitations of Using Ajax on a Web Page? A. security, SEO search engine indexing, user experience, accessibility issues, browser integration, response time concerns, SEO 4. What is the difference between .call() and .apply()? .call() is used when the number of the function’s arguments are known to the programmer .apply() is used when the number is not known 5. Explain the purpose of each of the HTTP request types when used with a RESTful web service. -- GET, POST, PUT, PATCH, DELETE, TRACE, OPTIONS, HEAD, Connect. HEAD, GET, OPTIONS and TRACE) are defined as safe methods 6. Explain the difference between stateless and stateful protocols. Which type of protocol is HTTP? Explain your answer. -- A stateless communications protocol treats each request as an independent transac