Describe both iterative and recursive way.

Credit: Socket.io

Linear search:


Cadit: Always ask
  1. What is Inline Element


Cadit: Always ask
  1. What is Inline Element


Credit:Jacob Ward
var string = “Welcome to this Javascript Guide!”;var reverseEntireSentence = reverseBySeparator(string, “”);var reverseEachWord = reverseBySeparator(reverseEntireSentence, “ “);function reverseBySeparator(string, separator) {return string.split(separator).reverse().join(separator);}


const parsed = parseInt(x, base);
4! = 4 × 3 × 2 × 1 = 247! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 50401! = 1


  1. Why fragments are better than container divs?


  1. How would you verify a prime number?
function isPrime( number ) {const max = Math.ceil( Math.sqrt(number) );for (let i = 2; i <= max; i++) {   if (number % i === 0) {      return false;   } }return true;
}
console.log(isPrime(7));// output: true…


  1. What are the different ways to get an element from DOM?
  • getElementById to get a element that has the provided Id.
  • getElementsByClassName to get a nodelist by providing a class name.
  • getElementsByTagName to get a nodelist by the provided tag name.
  • querySelector you will pass css style selector and this will return first matched element in the DOM.
  • querySelectorAll will return a non-live nodelist by using depth-first pre order traversal of all the matched elements. …


  1. How can we get the geographical position of a user in HTML5?
<svg>....</svg>


Data structure :

Md.Saiful Islam

Front-end web developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store