I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I would approach something like this in as simple a manner as possible though. I'd use those creaky, dinosaur-like for loops and so on. I'd tell them I was doing it deliberately, too. I might make the code more modern in a second pass or talk about it in the inevitable section afterwards where they ask you what you could do to improve it.
Just my vector. I've never passed a whiteboard interview, though, so what do I know.
Thanks Ben!
While I agree with you, it's becoming more rare everyday for me to use for statements. They just don't came anymore as first option to be honest! I guess that the community did a good job in advocating for array methods lately!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Cool article.
I would approach something like this in as simple a manner as possible though. I'd use those creaky, dinosaur-like
for
loops and so on. I'd tell them I was doing it deliberately, too. I might make the code more modern in a second pass or talk about it in the inevitable section afterwards where they ask you what you could do to improve it.Just my vector. I've never passed a whiteboard interview, though, so what do I know.
Thanks Ben!
While I agree with you, it's becoming more rare everyday for me to use
for
statements. They just don't came anymore as first option to be honest! I guess that the community did a good job in advocating for array methods lately!