Our site uses cookies. Learn more about their purpose and change of settings in a browser If you are using the site, you give you consent to use cookies, according to current browser settings. Got it

Basic JavaScript Part VII

  • Language JavaScript
JS Assessment for basic JavaScript knowledge. The exercise consist of a few simple tasks. You are supposed to implement functions, having provided only the function name and purpose.

Basic JavaScript Part VII

Summary

This is JS Assessment for basic JavaScript knowledge. The exercise consists of a few simple tasks. You are supposed to implement functions having only the function name and purpose provided.

Goals

Your solutions should be placed inside app/exercise7.js file(inside window.exercise7 object).

isPrimeNumber(num)

It checks if the num is a prime number. It returns true or false.

whatType (arg)

It returns the type of arg.

findMin (arr)

It returns the minimum number from array. When array is empty, it returns false.

findAlmostMax(arr)

It returns the second greatest number from arr array. When the array is empty or doesn't contain any numbers, it returns false.

findAlmostMin(arr)

It returns the second lowest number from arr array. When array is empty or doesn't contain any numbers, it returns false.

Before you start...

JavaScript basic functions:

http://www.w3schools.com/jsref/

Javascript EcmaScript5 tutorials and more:

https://developer.mozilla.org/en-US/docs/Web/JavaScript

Setup

To install dependencies

npm install

JShint

To run jshint:

grunt jshint:default

Run tests

To start developing unit tests

grunt test:dev

To run tests and static analysis

npm test

Good luck!

Start this test

Labnoratory Academy Ltd (Realskill) is a Data Controller. Personal data will be processed to facilitate IT skill test. More
... Przewidywane kategorie odbiorców danych: pracownicy Bulldogjob oraz Labnoratory Academy Ltd. Podmiotowi danych przysługuje prawo do żądania dostępu do danych dotyczących swojej osoby, ich sprostowania, usunięcia, ograniczenia przetwarzania, do przenoszenia danych oraz wniesienia skargi do organu nadzorczego.
Go to the top and begin