Solved The following code from a Javascript-like language | Chegg.com

Solved The following code from a Javascript-like language | Chegg.com