Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx39
// BrowserHistory class definitionclass BrowserHistory { constructor(url) { this.history = []; this.pointer = -1; // fill in } visit(url) { // fill in } back() { // fill in } forward() { // fill in }}// Driver code to test the BrowserHistory classconst browserHistory = new BrowserHistory("https://algodaily.com");// Visiting new URLsbrowserHistory.visit("https://google.com");browserHistory.visit("https://facebook.com");OUTPUT
Results will appear here.