skip to Main Content

Visual Studio Code – VSCode ts-node/register launches old compiled JS file instead of the specified TS file

I have the following launch.json for my TypeScript project in Visual Studio Code: { "version": "0.2.0", "configurations": [ { "name": "Launch task", "type": "node", "request": "launch", "program": "${workspaceFolder}/src/index.ts", "cwd": "${workspaceFolder}/src", "runtimeArgs": [ "-r", "ts-node/register" ], "env": { "NODE_ENV": "development" },…

VIEW QUESTION

How to merge two arrays without using inbuilt/predefined function – Javascript

Input arrays : var arr1 = [{EmpID:'1',Name:'PB',EmpCode:'10001'},{EmpID:'2',Name:'SS',EmpCode:'10002'}]; var arr2 = [{EmpID:'1',Address:'GGN'},{EmpID:'2',Address:'SP-GGN'}]; Expected Output : [{EmpID:'1',Name:'PB',EmpCode:'10001',Address:'GGN'},{EmpID:'2',Name:'SS',EmpCode:'10002',Address:'SP-GGN'}]; I tried below logic function fun(){ var arr1 = [{EmpID:'1',Name:'PB',EmpCode:'10001'},{EmpID:'2',Name:'SS',EmpCode:'10002'}]; var arr2 = [{EmpID:'1',Address:'GGN'},{EmpID:'2',Address:'SP-GGN'}]; var arr3= []; for(var k=0; k < arr1.length; k++){ arr3.push(arr1[k]); }…

VIEW QUESTION
Back To Top
Search