Programming is the process of creating instructions for a computer, called programs. Programmers write code in programming languages so that computers can perform specific tasks, such as building websites, apps, or managing complex systems. In simple terms, programming is like giving instructions to a machine in a language it understands.
Task: String ends with?
programming language: JavaScript
function solution(str, ending){
let count = 1;
for (let i = ending.length - 1; i >= 0; i -= 1) {
if (ending[i] === str[str.length - count]) {
count += 1;
} else {
return false;
}
}
return true;
}
2.Sail-club: