const LoanType = [ { "type": "Auto Loan (Personal)", "security": "Secured" }, { "type": "Housing Loan", "security": "Secured" }, { "type": "Property Loan", "security": "Secured" }, { "type": "Loan Against Shares / Securities", "security": "Secured" }, { "type": "Personal Loan", "security": "Unsecured" }, { "type": "Consumer Loan", "security": "Secured" }, { "type": "Gold Loan", "security": "Secured" }, { "type": "Education Loan", "security": "Secured" }, { "type": "Loan to Professional", "security": "Unsecured" }, { "type": "Leasing", "security": "Unsecured" }, { "type": "Overdraft", "security": "Secured" }, { "type": "Two-wheeler Loan", "security": "Secured" }, { "type": "Non-Funded Credit Facility", "security": "Unsecured" }, { "type": "Loan against Bank Deposits", "security": "Secured" }, { "type": "Fleet Card", "security": "Unsecured" }, { "type": "Telco - Wireless", "security": "Unsecured" }, { "type": "Telco - Broadband", "security": "Unsecured" }, { "type": "Telco - Landline", "security": "Unsecured" }, { "type": "Seller Financing", "security": "Unsecured" }, { "type": "Seller Financing Soft Enquiry", "security": "NA" }, { "type": "GECL Loan Secured", "security": "Secured" }, { "type": "GECL Loan UnSecured", "security": "Unsecured" }, { "type": "Loan on Credit Card", "security": "Unsecured" }, { "type": "Prime Minister Jaan Dhan Yojana - Overdraft", "security": "Unsecured" }, { "type": "Mudra Loans – Shishu / Kishor / Tarun", "security": "Unsecured" }, { "type": "Insurance", "security": "Unsecured" }, { "type": "Short Term Personal Loan [Unsecured]", "security": "Unsecured" }, { "type": "Priority Sector- Gold Loan [Secured]", "security": "Secured" }, { "type": "Secured Credit Card", "security": "Secured" }, { "type": "Used Car Loan", "security": "Secured" }, { "type": "Construction Equipment Loan", "security": "Secured" }, { "type": "Tractor Loan", "security": "Secured" }, { "type": "Corporate Credit Card", "security": "Unsecured" }, { "type": "Kisan Credit Card", "security": "Unsecured" }, { "type": "Microfinance – Business Loan", "security": "Unsecured" }, { "type": "Microfinance – Personal Loan", "security": "Unsecured" }, { "type": "Microfinance – Housing Loan", "security": "Secured" }, { "type": "Microfinance – Others", "security": "Unsecured" }, { "type": "Pradhan Mantri Awas Yojana - Credit Link Subsidy Scheme MAY CLSS", "security": "Secured" }, { "type": "P2P Personal Loan", "security": "Unsecured" }, { "type": "P2P Auto Loan", "security": "Secured" }, { "type": "P2P Education Loan", "security": "Unsecured" }, { "type": "Business Loan – Secured", "security": "Secured" }, { "type": "Business Loan – General", "security": "Unsecured" }, { "type": "Business Loan - Unsecured", "security": "Unsecured" }, { "type": "Temporary Overdraft [Unsecured]", "security": "Unsecured" }, { "type": "Business Loan-Priority Sector-Small Business", "security": "Unsecured" }, { "type": "Business Loan - Priority Sector- Others", "security": "Unsecured" }, { "type": "Business Non-Funded Credit Facility – General", "security": "Unsecured" }, { "type": "Business Non-Funded Credit Facility - Priority Sector - Small Business", "security": "Unsecured" }, { "type": "Business Non-Funded Credit Facility - Priority Sector - Agriculture", "security": "Unsecured" }, { "type": "Business Non-Funded Credit Facility - Priority Sector - Other", "security": "Unsecured" }, { "type": "Business Loan Against Bank Deposits", "security": "Secured" }, { "type": "Working Capital Loan", "security": "Secured" }, { "type": "Agriculture Loan", "security": "Secured" }, { "type": "Commercial Equipment Loan", "security": "Secured" }, { "type": "Auto Overdraft", "security": "Secured" }, { "type": "Loan against Card", "security": "Unsecured" }, { "type": "Auto Lease", "security": "Unsecured" }, { "type": "BUSINESS LOAN - DIRECTOR SEARCH-Soft Enquiry - Score Unaffected", "security": "Secured" }, { "type": "Dispute Resolution - CIR", "security": "NA" } ] const securedLoanTypes = LoanType.filter(loan => loan.security === "Secured").map(loan => loan.type); const unsecuredLoanTypes = LoanType.filter(loan => loan.security === "Unsecured").map(loan => loan.type); console.log("Secured Loan Types:", securedLoanTypes); console.log("Unsecured Loan Types:", unsecuredLoanTypes);
Write, Run & Share NodeJS code online using OneCompiler's NodeJS online compiler for free. It's one of the robust, feature-rich online compilers for NodeJS language,running on the latest LTS version NodeJS 16.14.2. Getting started with the OneCompiler's NodeJS editor is easy and fast. The editor shows sample boilerplate code when you choose language as NodeJS and start coding. You can provide the dependencies in package.json
.
Node.js is a free and open-source server environment. Node.js is very popular in recent times and a large number of companies like Microsoft, Paypal, Uber, Yahoo, General Electric and many others are using Node.js.
Google chrome's javascript engine V8
and is pretty fast.Asynchronous
, event-driven
and works on single-thread model
thus eliminating the dis-advantages of multi-thread model.Express is one of the most popular web application framework in the NodeJS echosystem.
let moment = require('moment');
console.log(moment().format('MMMM Do YYYY, h:mm:ss a'));
const _ = require("lodash");
let colors = ['blue', 'green', 'yellow', 'red'];
let firstElement = _.first(colors);
let lastElement = _.last(colors);
console.log(`First element: ${firstElement}`);
console.log(`Last element: ${lastElement}`);
Following are the libraries supported by OneCompiler's NodeJS compiler.