Rahaf Hawamdeh
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Techinical Interview Questions ## JavaScript - ==What is JavaScript?== JavaScript is a client-side as well as server side scripting language that can be inserted into HTML pages and is understood by web browsers. JavaScript is also an Object based Programming language. - ==What are JavaScript Data Types?== Number, String ,Boolean, null , undefined ,Object ,Symbol [the most useful resorse about **type of**](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) - ==Higher Order Functions== A callback function, is a function that is passed as an argument to another function. A higher-order function is a function that takes a callback or return another function. - ==Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer, if any?== Timers are used to execute a piece of code at a set time or also to repeat the code in a given interval of time. This is done by using the functions setTimeout, setInterval and clearInterval. The setTimeout(function, delay) function is used to start a timer that calls a particular function after the mentioned delay. The setInterval(function, delay) function is used to repeatedly execute the given function in the mentioned delay and only halts when cancelled. The clearInterval(id) function instructs the timer to stop. Timers are operated within a single thread, and thus events might queue up, waiting to be executed. - ==What is called Variable typing in Javascript?== Variable typing is used to assign a number to a variable and the same variable can be assigned to a string. Example i = 10; i = "string"; This is called variable typing. - ==What are escape characters?== Escape characters (Backslash) is used when working with special characters like single quotes, double quotes, apostrophes and ampersands. Place backslash before the characters to make it display. Example: document.write "I m a "good" boy" document.write "I m a \"good\" boy" - ==What are JavaScript Cookies?== Cookies are the small test files stored in a computer and it gets created when the user visits the websites to store information that they need. Example could be User Name details and shopping cart information from the previous visits. - ==What is break and continue statements?== Break statement exits from the current loop. Continue statement continues with next statement of the loop. - ==What are the two basic groups of dataypes in JavaScript?== They are as – Primitive Reference types. Primitive types are number and Boolean data types. Reference types are more complex types like strings and dates. - ==Which keywords are used to handle exceptions?== Try… Catch---finally is used to handle exceptions in the JavaScript Try{ Code } Catch(exp){ Code to throw an exception } Finally{ Code runs either it finishes successfully or after catch } - ==What are the different types of errors in JavaScript?= There are three types of errors: Load time errors: Errors which come up when loading a web page like improper syntax errors are known as Load time errors and it generates the errors dynamically. Run time errors: Errors that come due to misuse of the command inside the HTML language. Logical Errors: These are the errors that occur due to the bad logic performed on a function which is having different operation. - ==How will you explain closures in JavaScript? When are they used?== Closure is a locally declared variable related to a function which stays in memory when the function has returned ## Functions - ==callback function== ``` A function that is passed as an argument to another function ``` - ==higher-order function== ``` A function that takes another function as an argument and/or returns a function ``` - ==what are pure functions?== ``` 1- it's the functions that always returns the same result from the same arguments. 2- and has no side effects. ``` for more : https://github.com/ali-7/ws-pure-functions-easy-testing ## React ```js= import React from 'react' ``` - `react` is a javascript library, we import `react` npm package" - react used for single page application: ![](https://i.imgur.com/XDTKXYY.png) - ==Server Side vs Client Side== https://www.freecodecamp.org/news/what-exactly-is-client-side-rendering-and-hows-it-different-from-server-side-rendering-bd5c786b340d/ - ==Babel and Webpack== : https://dev.to/getd/wtf-are-babel-and-webpack-explained-in-2-mins-43be - ==Differentiate between Real DOM and Virtual DOM.== ![](https://i.imgur.com/sHeb2Az.png) - ==What's the different between npm vs npx?== npx: downloads and executes Node.js commands without installing them. it comes with `npm` since v5.2 "`npx create-react-app <app-name>` it downloads the recent version of create-react-app relaese,run it, then it removes it from your system" - ==what is JSX ?== - JSX is a special language we use to build a component's output. - Under the hood, React will process the JSX and it will transform it into JavaScript that the browser will be able to interpret. - React gives us this interface for one reason: it's easier to build UI interfaces using JSX. ### ==React Resources== - https://dev.to/hamza/framework-vs-library-vs-package-vs-module-the-debate-3jpp - https://www.edureka.co/blog/interview-questions/react-interview-questions/ - https://github.com/sudheerj/reactjs-interview-questions ## React Hooks https://github.com/gazaskygeeks/code-academy-workshops/tree/master/workshops/hooks-ws intro to React Hooks video https://reactjs.org/docs/hooks-intro.html ![](https://i.imgur.com/6fjTmxw.png) - ==higher-order component== ``` A higher-order component (HOC) is an advanced technique in React for reusing component logic. ``` read more : https://reactjs.org/docs/higher-order-components.html - https://www.robinwieruch.de/react-hooks-higher-order-components ## JSON JSON is a way to store information that's organised and easy to access. It looks like a JavaScript object but its keys and values are always strings before parsing. Once parsed it's values could be string, number, boolean, object, array or null - JSON has two methods to convert strings to JSON objects and back again : 1. **let string = JSON.stringify(object)** 2. **let object = JSON.parse(string)** ## Node.js https://github.com/foundersandcoders/npm-introduction - ==what is the difference between node.js and js?== ``` js is a programming languge runs in a browser , node.js is a running inviromant for js use v8 angine and it's for the backend helps us do the server side etc .. ``` https://www.geeksforgeeks.org/difference-between-node-js-and-javascript/ - ==The difference between “require(x)” and “import x”== ``` The major difference between require and import, is that require will automatically scan node_modules to find modules, but import, which comes from ES6, won't. so : Most people use babel to compile import and export, which makes import act the same as require. ``` https://stackoverflow.com/questions/46677752/the-difference-between-requirex-and-import-x ## Express.js ## HTTP https://github.com/ali-7/api-workshop/blob/master/02-http.md The Hypertext Transfer Protocol (HTTP) is the mechanism through which data is requested and provided on the World Wide Web. ### HTTP methods - GET - POST - PUT - DELETE ### HTTP status codes Status codes accompany a server response to indicate whether the request was successful. They are made up of a three-digit number and a human-readable phrase, eg 200 OK or 404 Not Found. ## xhr https://github.com/ali-7/api-workshop/blob/master/03-xmlhttprequest.md It's important that you know that an XMLHttpRequest (XHR) is an object. You can create an instance of XHR using an object constructor as follows: `let xhr = new XMLHttpRequest()` ```js= let xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { document.getElementById("demo").innerHTML = xhr.responseText; } }; xhr.open("GET", "xmlhttp_info.txt", true); xhr.send(); ``` ## REST API ## POSTGRESQL ## HTML ## CSS ## TDD https://github.com/mossa-Sammer/testing-tdd-intro - ==What is Test-driven Development?== TDD is a methodology for writing code where you write the tests before your functions. This way you are forced to really think through exactly what you want your code to do (i.e. what values your function takes and returns) before you start writing it. It's like planning an essay (if your plan could also tell you if you've got the right answer). You also end up with a complete test-suite for your code as soon as you're finished. This is valuable because it's harder to go back and write tests once you're done (especially if you don't do it right away). This is also called the Red-Green-Refactor cycle of T ![](https://i.imgur.com/M8Zq8zu.png) - ==**Pure functions**== https://github.com/ali-7/ws-pure-functions-easy-testing ## NEXT.js ## Authentication and validation ## Redux ## Firebase ## UI/UX ## TypeScript

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully