Giter Site home page Giter Site logo

Interview Question :-

Q:1:

let race = function() {
  setTimeout(() => console.log("timeout"), 0);
  setImmediate(() => console.log("immediate"));
  process.nextTick(() => console.log("nextTick"));
  console.log("current event loop");
}
race()

O/P:

current event loop
nextTick
timeout
immediate

Q2: Find Target Value

function findPair(array,target){
  array.sort(function(a,b){return a-b})
  console.log(array)
  let firstIndex=0
  let lastIndex =array.length-1
  let finalArray=[]
  while(firstIndex<lastIndex){
      let sum =array[firstIndex]+array[lastIndex]
      console.log("sum",sum)
      if(sum===target){
          finalArray.push(`${array[firstIndex]},${array[lastIndex]}`)
          console.log("target",sum)
          firstIndex++
          lastIndex--
      }else if(sum<target){   
          firstIndex++
          console.log("firstIndex",firstIndex)
      }else{
          lastIndex--
          console.log("lastIndex",lastIndex)
      }
  }
    console.log(finalArray) 
}

findPair([1,2,3,4,5,6,7,9],10)

Q:

const promise1 = Promise.resolve(3)

async function abc () {
  let data = await promise1
  console.log(data) //3
  return data
}
console.log('****', abc()) //Promise { <pending> }

Other Topics

Event loop
concurrency
io
close
non blocking io
API
protocol
url Desiging
Hosting
promise and .all and fail cases
Object key finding Complexity - O(N)
HATEOAS

From <https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api> 



Indexing
DynamoDB
Global Positionining Indexing
Single Table Desiging
IIFE
Micro Service Architecture


-OLAP and OLDP
-ideapotenstional such as GET,PUT,DELETE
- API Standard Rules
-Optimize API RESPONSE
   - DATABASE
-Caching

js
node js
react js
typescript
docker
aws
tdd- jest/jasmine/karma- equivalent
scrum environment
postgresql- DB
hands on on ds/algos
 
 
no sql db- mongo, dynamo
radis cache
kafka/ rabbit/ kinesis- msg streaming services
vue js- good to have
 
 
good to know jenkins and kubernetes
 
 
services
deployment
unit test cases- write own
closures/ scope- js
js is oops? it support oops
current trends in js
current ecma script standard

akshayprmar's Projects

algorithms icon algorithms

Collection of algorithms in multiple programming languages.

aws-sdk-js icon aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js

crater icon crater

Free & Open Source Invoice App for Freelancers & Small Businesses

javascript-algorithms icon javascript-algorithms

Algorithms and data structures implemented in JavaScript with explanations and links to further readings

node-starter icon node-starter

Boilerplate for quick-start your REST API. Db, auth, push updates via sockets, interactive API documentation (Swagger) and unittests are already included! This project is based on Angular FullStack Generator project https://github.com/angular-fullstack/generator-angular-fullstack

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.