1. Question:What do you mean by local and global variable? 

    Answer
    Global variable: A global variable, as the name implies, has global scope and is defined in the entire script.
    Local variable: Local variables are local to the functions in which they are defined.

    1. Report
  2. Question:What is Regular Expression? 

    Answer
    Regular Expression is an object that describes the pattern of characters.
    Regular expressions are used to perform pattern-matching and "search-and-replace" functions on text.

    1. Report
  3. Question:What is the difference between undefined value and null value? 

    Answer
    An undefined value is returned when we attempt to use a variable that has not been defined or that is declared but that we forgot to provide with a value.
    On the otherhand, null value is returned when we declare and define a variable as null if we want absolutely nothing in it but we don't want it to be undefined.

    1. Report
  4. Question:What is escape sequence? How to use it? 

    Answer
    Escape sequence is a way to include escape characters and sequences for additional control over string literals. It is written by prefacing a code with a backslash(\). For example, the literal \' prints an apostrophe without affecting the literal itself.

    1. Report
  5. Question:What are Data Types in JavaScript? 

    Answer
    In JavaScript Data types are divided into two basic categories, primitive and compound.Primitive Data Types:Boolean values, numbers, strings, and the null and undefined values all constitute primitive data types.Compound Data Types: Compound data types are made of more than one components. Two primitive data types, such as 10 multiplied by 7, can make up compound data.

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd