Essential JavaScript

Going Further

Plant Purchase Kata

Someone you know really likes plants. They buy them all the time.

They are trying to see if they should buy a new plant they just found.

Given their current account balance (accountBalance) and the cost of a specific plant (plantCost), return their account balance after buying the plant.

Code Editor

Click "Run Tests" to execute your function and see the test results below.

Test Results

Run your code to see test results

Console Output

// Console output will appear here...

0 output lines