function isValidWalk(walk)

JavaScript
function isValidWalk(walk) {}
Source

Also in JavaScript: