The createNote helper function has only two parameters - page and content. But the code is calling the function with three arguments - createNote(page, 'note content', true)
I fixed the code by calling the createNote function by calling it with only first two arguments
I assume the last boolean argument is for the "important" property of a note, but it isn't used here correctly