Removed extra backtick.

This commit is contained in:
Amy J. Ko 2021-07-18 16:48:58 -07:00
parent f5eeaac3e7
commit e27c9d8ffc

View file

@ -33,7 +33,7 @@ Of course, if the above was JavaScript code (which doesn't support static typing
This brings us to a second purpose of writing functional specifications: to help _verify_ that functions, their input, and their output are correct. Tests of functions and other low-level procedures are called *unit tests*. There are many ways to use specifications to verify correctness. By far, one of the simplest and most widely used kinds of unit tests are *assertions*<clarke06>. Assertions consist of two things: 1) a check on some property of a function's input or output and 2) some action to notify about violations of these properties. For example, if we wanted to verify that the JavaScript function above had integer values as inputs, we would do this:
``javascript
`javascript
// Return the smaller of the two numbers, or if they're equal, the second number.
function min(a, b) {
if(!Number.isInteger(a))