Friday, 23 October 2015

Object Oriented JavaScript interview questions and answers for experienced

Object Oriented JavaScript interview questions and answers for experienced


Question: Is JavaScript case sensitive?
Yes, JavaScript is a case sensitive..


Question:What are different Data-Types of JavaScript?
Following are different data-type in JavaScript.
  1. String
  2. Number
  3. Boolean
  4. Function
  5. Object
  6. Null
  7. Undefined



Question: What is an Object?
The object is a collection of properties & each property associated with the name-value pairs.
The object can contain any data types (numbers, string, arrays, object etc.).


Question: What are different two ways of creating an object?
Object Literals: This is the most common way to create the object with object literal.
For Example:
var emptyObj= {};

Object Constructor: It is way to create object using object constructor and the constructor is used to initialize new object.
For Example:
Var obj = new Object();


Question: What is scope variable in JavaScript?
The scope is set of objects which can be variables and function.
"Scope variable" can be have global scope variable and local scope variable.



Question: Give an example creating Global variable
Global variable: A variable which can be variable from any where of the page.
Following are different two ways.
First Way Declare the JavaScript variable at the top of JavaScript code and out of function & objects.
var globalVariable1 ='This is global variable 1'

Second WayDeclare a varaible without "var" in Function.
function testfunction(){
    globalVariable2 ='This is global variable 2'
}



Question: Give an example creating Global variable
Local variable: A variable which can be local and can't access globally.
When we declare a local varriable, Its local and can't access globally. It must create using "var" keyword.
function testfunction1(){
    var localVariable ='This is local variable '
}


Question: What is public, private and static variables in JavaScript?
Public Varaible: A variable which associate to object and is publicily available with object.
For Example:
function funcName1 (name) {
 this.publicVar='1'; 
}

Private Variable: A variable which associate to object and is limited available.
For Example:
function funcName2 (name) {
 var privateVar='1'; 
}

Static variable: A static member is shared by all instances of the class as well as the class itself and only stored in one place.
For Example:
function funcName3 (name) {
 
}
// Static property
funcName3.name = "Web Technology Experts Notes";



Question: How to achieve inheritance in JavaScript
"Pseudo classical inheritance" and "Prototype inheritance"


Question: What is closure in JavaScript?
When we create the JavaScript function within another function and the inner function freely access all the variable of outer function.


Question: What is prototype in JavaScript?
All the JavaScript objects has an object and its property called prototype & it is used to add and the custom functions and property. See Following example in which we create a property and function.
var empInstance = new employee();
empInstance.deportment = "Information Technology";
empInstance.listemployee = function(){

}



Tuesday, 20 October 2015

Manage SPF Record - How to add SPF Record?

Manage SPF Record - How to add Spf Record?


Question: What is SPF Record?
An SPF record is a type of DNS record that identifies which mail servers are permitted to send email on behalf of your domain. Full form of DNS is Domain Name Service.


Question: What is purpose of SPF Record?
It identifies which mail servers are permitted to send email on behalf of your domain. In this way, It help us to prevent from spammer email.

Question: How to add SPF record?
You manage SPF Record, you must need have access DNS Manager.


Question: How to add SPF Record in Godaddy.com?
https://www.mail-tester.com/spf/godaddy

IF you are using other than Godaddy then check your "Web hosting company"
https://www.mail-tester.com/spf/

Question: Can we add two domain in SPF Record?
Yes, you can add two OR more domain in SPF Record.


Question: Can we add Two SPF Record
No, you can't add two OR more SPF Record.
Multiple SPF records will cause the SPF evaluation to fail with "permerror" (see RFC 7208, Section 4.5.).
But you can add multiple domain in Single SPF Record.


Question: How to add multiple domain in Single SPF Domain?
Single Domain in single SPF Record
v=spf1 include:spf.protection.outlook.com -all

Two Domain in single SPF Record
v=spf1 include:spf.protection.outlook.com include:spf.mandrillapp.com -all

Three Domain in single SPF Record
v=spf1 include:spf.protection.outlook.com include:spf.mandrillapp.com include:spf.domain.com  -all

Question: How to check SPF Record is available OR Not?
Make sure there is NO Error.


Question: How to Remove "support@mail128-15.atl41.mandrillapp.com" In Email's from?
To remove this text, you need to add SPF & DKIM Record in your DNS.
https://mandrill.zendesk.com/hc/en-us/articles/205582277-How-do-I-add-DNS-records-for-my-sending-domains-