Given a string S, print the 1st and 3rd character of the string (chracter index starts from 1).
const readline = require('readline');
const inp = readline.createInterface({
input: process.stdin
});
const userInput = [];
inp.on("line", (data) => {
userInput.push(data);
});
inp.on("close", () => {
var data = userInput[0].split(" ");
var a = String(data[0]);
var b=a.split('')
var c =""
var c=b[0]+b[2]
console.log(c);
});
const readline = require('readline');
const inp = readline.createInterface({
input: process.stdin
});
const userInput = [];
inp.on("line", (data) => {
userInput.push(data);
});
inp.on("close", () => {
var data = userInput[0].split(" ");
var a = String(data[0]);
var b=a.split('')
var c =""
var c=b[0]+b[2]
console.log(c);
});
Comments
Post a Comment