Skip to main content

Posts

Showing posts with the label slice

Explain - This, Escape, Unescape, Slice, Splice, Let, Var

What is unescape() and escape() function? Ans.       escape() - This function is responsible for coding a string to transfer the information.      unescape() - This function is responsible for decodes the coded string. *  What is the difference between slice and splice? Ans. Slice Splice Doesn't modify the original array. Modifies the original array. Returns the subset of the original array. Returns the deleted elements as array. Used to pick the elements from array. Used to insert or delete elements from array. *  What is the "this" keyword in JavaScript? Ans.   "this" keyword refers to the object from where it was called. *  Difference between let and var.     var - * It has function scope.                 *   variable will be hoisted.      let - *  It has block scope.       ...