TutorMe homepage
Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Nick N.
Expert .NET & Web Developer with a love for teaching
Tutor Satisfaction Guarantee
Javascript Programming
TutorMe
Question:

Implement the forEach() function.

Nick N.
Answer:

Something that's difficult to understand in Javascript are functions. Especially functions that take another function as a parameter - a callback function! Creating the forEach function may help you better understand what that means. Given an array of items, we call forEach to loop over them and perform some function per item in the array. And the only way this works is by passing in a callback function that will be executed for each item in the list. So really - there's not much happening! We can represent the core of the function like so: function forEach(collection, callback) { loop over collection callback(item in collection) } In this case, callback is a function argument that we can call on every item in our collection. Getting an inside look at how features of a language work can really remove a lot of the magic!

HTML Programming
TutorMe
Question:

What are semantic HTML elements?

Nick N.
Answer:

Semantics regards the study of meaning. What does our HTML mean? HTML has always described the content of a document on the web. It should not be concerned with logic or presentation. There is additional context that can make HTML more meaningful - semantic HTML elements! For example, the nav element. While it's totally legal to create a navigation bar with any container element, a nav provides screen-readers with additional context that helps people navigate a site more easily. You'll also score more points on Google's search algorithms!

C Sharp Programming
TutorMe
Question:

Given a string, and without using any built-in string functions, determine if it is a palindrome; that is, determine if the string is spelled the same way backwards and forwards. (Ex: noon)

Nick N.
Answer:

The first thing to remember is that a string is like an array of characters. Therefore, we can iterate over a string using a for loop, just like you would do for an array. With that ability, we can begin inspecting each character of a string at a time. As is the case with many things in programming, there are multiple ways to solve this problem. But lets try looping over our string in reverse order and create a new string by appending each character as we loop through. So when we finish looping through our string, we should have another string that we can compare to our original. If they are equal, we have a palindrome! Pseudo code: string wordToReverse = "noon"; string reversed = ""; for(int i = wordToReverse.length-1; i >= 0; i--) { reversed += wordToReverse[i]; } return wordToReverse == reversed;

Send a message explaining your
needs and Nick will reply soon.
Contact Nick
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.