I would like a JavaScript function to have optional arguments which I set a default on, which get used if the value isn't defined (and ignored if the value is passed). In Ruby you can do it like this:
def read_file(file, delete_after = false)
# code end
Does this work in JavaScript?
function read_file(file, delete_after = false) {
// Code
}