This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 |