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 I

  • Language JavaScript
JS Assessment tests for basic JavaScript knowledge. Each exercise consist of a few simple tasks. You have been provided with the function name and purpose, your job is to implement them.

Basic JavaScript Part I


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.


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

getDescendingNumbers(numberFrom, numberTo)

It returns a string with numbers in the descending order and separated by ' ' (space). If the numberFrom is lower than the numberTo , it returns false. If the parameters aren't numbers, it should also return false.

deleteString(string, array)

It removes all the occurrences of the string in an array of strings. It returns the update array of strings.


It returns a number of String elements in the array.


It squares the value of every odd number inside the array. It returns an update array and leaves the rest of items unaffected.


It calculates the area of a trapezoid. If the parameters are incorrect the function should return false.

Before you start...

JavaScript basic functions:


Javascript EcmaScript5 tutorials and more:



To install dependencies

npm install


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

I agree to subscription in accordance with the terms of service.
Go to the top and begin