<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RoyfordWanyoike</title>
    <description>The latest articles on DEV Community by RoyfordWanyoike (@royfordwanyoike).</description>
    <link>https://dev.to/royfordwanyoike</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F670767%2F4461f99a-7b18-41b3-bdb5-38ff15b1eca2.jpeg</url>
      <title>DEV Community: RoyfordWanyoike</title>
      <link>https://dev.to/royfordwanyoike</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/royfordwanyoike"/>
    <language>en</language>
    <item>
      <title>Javascript Interview Questions(Divided into levels)</title>
      <dc:creator>RoyfordWanyoike</dc:creator>
      <pubDate>Tue, 15 Feb 2022 14:00:05 +0000</pubDate>
      <link>https://dev.to/royfordwanyoike/javascript-interview-questionsdivided-into-levels-on0</link>
      <guid>https://dev.to/royfordwanyoike/javascript-interview-questionsdivided-into-levels-on0</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; Today no code time to look for a job
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ever went to apply for a Javascript job and got stuck on some of the areas to prepare for the interview? Boom Roy got you covered.  Check out. I just screened some of the common asked questions. Open to more on the comment section. Cheer!!! All the best&lt;br&gt;
&lt;strong&gt;Junior Dev Interview&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Explain Null and Undefined in JavaScript  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What does use strict do?  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the strict mode?  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain arrays in JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain Values and Types in JavaScript. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is Scope in JavaScript?  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is difference between == and === ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is let keyword in JavaScript?  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the difference between var, let, and const. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What are the JavaScript data types?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain the .pop() and .push() methods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Name all JavaScript’s Boolean logical operators&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is JSON&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What are the .slice() and .splice() methods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the DOM? And what does it do?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is a Polyfill?  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What are operators?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain .then keyword&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain equality in JavaScript&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is typeof operator?  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain how Bubble Sort works&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Given a string, reverse each word in the sentence&lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to empty an array in JavaScript?&lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain what is a callback function?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write a function that takes an array of integers and returns the sum of the integers after adding 1 to each&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;All the best to Junior JS devs applying for new roles&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mid-Level Javascript Dev. Interview
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;What is the definition of a Higher-Order Function?
  &lt;/li&gt;
&lt;li&gt;&lt;p&gt;Describe Closure concept in JavaScript &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What are the advantages and disadvantages of using use strict?&lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the purpose of setTimeout function?&lt;br&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the new keyword in JavaScript?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;What advantages are using arrow functions?&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What object.freeze() does? &lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain the difference between Object.freeze() vs const&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is generator in JS?&lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to remove duplicates from an array &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is Currying?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is IIFEs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;ol&gt;
&lt;li&gt;What's the difference between .call and .apply?
  &lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is Coercion in JavaScript?&lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain what is Hoisting in Javascript? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write a program for Recursive Binary Search1210&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;_&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Well we are done now its time for Big Boys Now&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Senior Javascript Devs "BigBoy's"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Write a program that checks if a given string is a palindrome and case sensitivity should be taken into account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write a program that Merges two sorted linked lists&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Given an integer, determine if it is a power of 2. If so, return that number, else return -1&lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When would you use the bind function?&lt;br&gt;
  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write a recursive function that performs a binary search&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why is this operator inconsistent?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain how async and await work. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can you describe the main difference between a .forEach  and a .map()?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain what is Fibonacci Search technique?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explain how QuickSort works&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement a queue using a linked list&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cheers to your interview tests. &lt;/p&gt;

&lt;p&gt;Reach Out at twitter &lt;a href="https://twitter.com/WanyoikeRoy"&gt;Roy Wanyoike&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>interview</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Introduction to Javascript</title>
      <dc:creator>RoyfordWanyoike</dc:creator>
      <pubDate>Mon, 14 Feb 2022 15:11:58 +0000</pubDate>
      <link>https://dev.to/royfordwanyoike/introduction-to-javascript-24d6</link>
      <guid>https://dev.to/royfordwanyoike/introduction-to-javascript-24d6</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction to ultimate javascript 101&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Javascript (JS) is a high-level, interpreted programming language used in web development.&lt;br&gt;
It is a language which is also known as dynamic, loosely typed and multi-paradigm. It is different from Java and it focuses much on the web. The two are different in concept and design. &lt;br&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;History of Javascript&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Javascript was invented by Brendan Eich back in 1995.It was converted to ECMA standard script in 1997. ECMAScript is the official name of the language. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Original JavaScript ES1 ES2 ES3 (1997-1999)&lt;/li&gt;
&lt;li&gt;The First Main Revision ES5 (2009)&lt;/li&gt;
&lt;li&gt;The Second Revision ES6 (2015)&lt;/li&gt;
&lt;li&gt;The Yearly Additions (2016, 2017, 2018)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Javascript offers all modern browser. These include chrome, internet explorer, microsoft edge, firefox, safari browser for apple and also the opera browser. it is used in many databases like CouchDB and MongoDB as their scripting and query languages. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;## Usages of Javascript&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Client-side validation&lt;/li&gt;
&lt;li&gt;Dynamic drop-down menu&lt;/li&gt;
&lt;li&gt;Displaying date and time at any moment&lt;/li&gt;
&lt;li&gt;Validate user input in an HTML form before form submission(sending the data to a server)&lt;/li&gt;
&lt;li&gt;Build forms that respond to user input without involving a server request&lt;/li&gt;
&lt;li&gt;Change the appearance of HTML elements&lt;/li&gt;
&lt;li&gt;Open, close and redirection of new windows or frames&lt;/li&gt;
&lt;li&gt;Manipulate HTML layers like hiding, moving, and allowing the user to drag them around a browser window&lt;/li&gt;
&lt;li&gt;Build complete client side programs&lt;/li&gt;
&lt;li&gt;Displaying popup windows and dialog boxes (e.g., alert dialog box,confirm dialog box and prompt dialog box)&lt;/li&gt;
&lt;li&gt;Displaying clocks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Pros of Javascript&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Speed. Client-side JavaScript is very fast because it can be run without server-side access.&lt;/li&gt;
&lt;li&gt;Simplicity: JavaScript is easier to learn and implement.&lt;/li&gt;
&lt;li&gt;Popularity: JavaScript is used almost everywhere in web design and development industry. Stack Overflow and GitHub have many projects using JavaScript. The language has gained a lot of traction in the industry in recent years.&lt;/li&gt;
&lt;li&gt;Interoperability: JavaScript can be inserted into any web page regardless of the file extension or inside scripts written in other languages like Perl and PHP.&lt;/li&gt;
&lt;li&gt;Server Load: Being client-side reduces the demand on the website server thereby decreasing overall load.&lt;/li&gt;
&lt;li&gt;Rich interfaces: Drag and drop components or slider gives a rich interface to your website with the use of JavaScript.&lt;/li&gt;
&lt;li&gt;Extended Functionality: Third party add-ons like Greasemonkey has enabled JavaScript developers to write of JavaScript snippets that can be executed on desired web pages to extend its functionality.&lt;/li&gt;
&lt;li&gt;Versatility: There are many ways to use JavaScript through Node.js server nowdays e.g., if it is bootstrap node.js with Express, a document database like mongodb must be used. JavaScript is also used in the front-end for clients. It is possible to develop an entire app from front to back end using only JavaScript.&lt;/li&gt;
&lt;li&gt;Updates: Since the advent of EcmaScript 5, ECMA International has dedicated to continue updating JavaScript annually.
**
## Disadvantages/Cons of JavaScript
**&lt;/li&gt;
&lt;li&gt;Client-Side Security: As the code is executed on the users’ computer, in some cases it can be exploited for malicious purposes which are not desirable.&lt;/li&gt;
&lt;li&gt;Browser Support: JavaScript is interpreted differently by different browsers whereas server-side scripts will always produce the same output. Client-side scripts can be a little unpredictable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Getting started with mighty Javascript&lt;/strong&gt;&lt;br&gt;
To understand javascript you need have some understanding of html and css. This is because javascript will be used to render pages andd make them responsive. &lt;/p&gt;

&lt;p&gt;Type this code on the editor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;html&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Welcome&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;JavaScript&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello JavaScript by JavaScript&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/html&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Welcome to JavaScript
Hello JavaScript by JavaScript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above code there are html tags and javascript code. The javascript code are enclosed in script tags.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello JavaScript by JavaScript&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/script&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Applications of Javascript&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Client side validation - This is really important to verify any user input before submitting it to the server and Javascript plays an important role in validting those inputs at front-end itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Manipulating HTML Pages - Javascript helps in manipulating HTML page on the fly. This helps in adding and deleting any HTML tag very easily using javascript and modify your HTML to change its look and feel based on different devices and requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User Notifications - You can use Javascript to raise dynamic pop-ups on the webpages to give different types of notifications to your website visitors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Back-end Data Loading - Javascript provides Ajax library which helps in loading back-end data while you are doing some other processing. This really gives an amazing experience to your website visitors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Presentations - JavaScript also provides the facility of creating presentations which gives website look and feel. JavaScript provides RevealJS and BespokeJS libraries to build a web-based slide presentations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Server Applications - Node JS is built on Chrome's Javascript runtime for building fast and scalable network applications. This is an event based library which helps in developing very sophisticated server applications including Web Servers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Javascript Development Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use the following editors to run javascript code. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Atom download &lt;a href="https://atom.io/"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;visual studio which can be downloaded &lt;a href="https://visualstudio.microsoft.com/downloads/"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;webstorm &lt;a href=""&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The next tutorial we will be diving on the Javascript variables.&lt;/p&gt;

&lt;p&gt;Contact&lt;br&gt;
Twitter &lt;a href="https://twitter.com/WanyoikeRoy"&gt;Roy Wanyoike&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>100daysofcode</category>
    </item>
  </channel>
</rss>
