Update functions.js

Spelling correction