There are three popular ways you can reverse a string in JavaScript. Solution #1 - Using S-P-J (Split-Reverse-Join) Split the string into array of characters using split() function Reverse the characters of array using reverse() function Join back the characters in the array using join() function Solution #2 - Using Loop - C-L-A(Create - Loop … Continue reading Reversing a string in 3 ways using JavaScript
Tag: coding
Creating Object map in node.js
Creating an Object map in node.js and how can we access the static and dynamic objects.
Using Dialogs and Prompts to build a conversational BOT on Azure
Using Dialogs and Prompts to build a conversational BOT on Azure . A bot communicates with a user via conversations. To manage conversational flow we use dialogs.
Java-Spring or JavaScript-Node.js?
Spring Framework for Java has been around past 15 years since its initial release. Most of the web developers prefer spring to build enterprise level web apps. But since last 3-4 years the Javascript has become more popular not only in the client-side development(Angular and React) but also towards the server-side development, thanks to nodejs. … Continue reading Java-Spring or JavaScript-Node.js?
Web Development Trends in 2018 and for future!
Since the launch of the first website made by Tim Berners-Lee in 1991, the website development practice have come a long way and every year new web design and development trends are coming. Developers are becoming more agile in learning about these new trends. In 2018, we'll look at the new trends which are hot … Continue reading Web Development Trends in 2018 and for future!
JavaScript: Donut Chart Inside another Donut Chart
To make a chart as shown above we have to use separate donut charts and align them in such a way that they look as one chart is inside another. Well it is possible through a simple CSS trick which designers miss...
Building a REST API in NodeJS, Express and MongoDB
REST stands for Representational state transfer. A REST API defines a set of functions which developers can perform requests and receive responses via HTTP protocol such as GET, POST, DELETE, PUT, PATCH. A Real World Example: Facebook provides a REST API which you can query to get the number likes, you can provide a search … Continue reading Building a REST API in NodeJS, Express and MongoDB
Connecting MongoDB with Node Js
To use mongo Db with the Node Js here we can use Mongoose npm package and mlab.com as mongo db cloud service provider...
Nodejs on the rocks: Express.js
MEAN Express JS is a web framework which makes it easier to build a web server in Node JS. Express helps in writing the NodeJS code cleanly. Installation npm install express --save Building and running HTML on a web server No need to mention header with Content-Type etc. like done before in nodejs. var express … Continue reading Nodejs on the rocks: Express.js
Node JS:101
MEAN Node JS: Web Server Part Creating a Simple Web Server var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World How are you !'); }).listen(8080,'localhost'); Executing the above code in Node will create a web server and when you will send the request to server using a browser it … Continue reading Node JS:101
NodeJs: HTTP Request – Response to REST API
Sending HTTP GET/POST Request and Response using Node JS. Code: var https = require("https"); exports.handler = (events,context,callback) => { var options = { host : 'hostname', port : '443', path : 'ifany', headers: { 'Authorization' : 'Basic' + new Buffer("username" + ':' + "password").toString('base64') } }; // request request = https.get(options, function(res){ var body = … Continue reading NodeJs: HTTP Request – Response to REST API