Skip to content

Instantly share code, notes, and snippets.

View karthikeyana's full-sized avatar
🎯
Focusing

KARTHIKEYAN.A karthikeyana

🎯
Focusing
View GitHub Profile
@karthikeyana
karthikeyana / getMovieTitles.js
Created January 25, 2019 10:48
Get a collection of movie titles using native Node.js
/*
Given a string `substr`, getMovieTitles() must perform the following tasks:
1. Query https://jsonmock.hackerrank.com/api/movies/search/?Title=substr (replace substr).
2. Initialize the titles array to store total string elements. Store the Title of each movie meeting the search criterion in the titles array.
3. Sort titles in ascending order and return it as your answer.
*/
const https = require('https')
const log = console.log