Smoothstack interview question

basic javascript questions and sql