Exercise on Tail Call Optimization & other Function Features
In the following exercises, you will use tail call optimization, create a stack, and examine how new.target behaves in ES5.
We'll cover the following
Exercise 1:
Implement a stack in ES6. In addition to a constructor, it should have a push()
, pop()
, and a len()
function that would return the number of elements in the stack.
Get hands-on with 1400+ tech skills courses.