Easy
This question is a daily question and will count towards your daily streak.
You are building a simple app that tracks the number of page views for different pages. However, the views counter is not incrementing as expected. Can you identify what’s wrong?
1let pageViews = { '/home': 10, '/about': 5 };23const incrementPageView = (page) => {4 pageViews[page]++;5 return pageViews[page];6};78console.log(incrementPageView('/home'));9console.log(incrementPageView('/about'));10console.log(incrementPageView('/contact'));