Добавить
Уведомления

Palindrome Solution JavaScript // Day 1 of 365 Days of Coding Challenge //JavaScript Challenge 1

The palindrome developer interview question is popular question that is asked in a lot of junior and mid level developer interviews. Here are some possible JavaScript solutions for palindromes with punctuation, numbers, and spaces with an explanation of what they are and which is the best. Day 1 of 365 Days of Coding I will post the challenge in the morning with the solution later in the day. If you would like to get the challenge emailed to you in the morning subscribe here: https://hellodevworld.com/misc/365-of-coding-announcement NOTE: after creating this video I went back and realized you can just do .replace(/[^\w]|_/g, ''). You could do that instead of the 2 chained replace statements in the solutions here is the blog post for this solution: https://hellodevworld.com/365-days-of-coding/advanced-palindrome-interview-question-javascript if you want a solution for the basic 1 word palindrome: https://hellodevworld.com/interview-help/palindrome-interview-question-solution-javascript ****************************************************** ℹ Help Links ℹ typeof: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof toLowerCase: https://www.w3schools.com/jsref/jsref_tolowercase.asp replace: https://www.w3schools.com/jsref/jsref_replace.asp regex: https://regex101.com/ split: https://www.w3schools.com/jsref/jsref_split.asp join: https://www.w3schools.com/jsref/jsref_join.asp reverse: https://www.w3schools.com/jsref/jsref_reverse.asp ternaries: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator Math.floor: https://www.w3schools.com/jsref/jsref_floor.asp for loops: https://www.w3schools.com/js/js_loop_for.asp charAt: https://www.w3schools.com/jsref/jsref_charat.asp ****************************************************** ****************************************************** My Gear: https://kit.co/HelloDevWorld/my-gear Blog: https://hellodevworld.com/ Facebook: https://www.facebook.com/hellodevworl... Dev.to: https://dev.to/hellodevworldblog ****************************************************** DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you!

Иконка канала JavaScript и алгоритмы
10 подписчиков
12+
16 просмотров
2 года назад
12+
16 просмотров
2 года назад

The palindrome developer interview question is popular question that is asked in a lot of junior and mid level developer interviews. Here are some possible JavaScript solutions for palindromes with punctuation, numbers, and spaces with an explanation of what they are and which is the best. Day 1 of 365 Days of Coding I will post the challenge in the morning with the solution later in the day. If you would like to get the challenge emailed to you in the morning subscribe here: https://hellodevworld.com/misc/365-of-coding-announcement NOTE: after creating this video I went back and realized you can just do .replace(/[^\w]|_/g, ''). You could do that instead of the 2 chained replace statements in the solutions here is the blog post for this solution: https://hellodevworld.com/365-days-of-coding/advanced-palindrome-interview-question-javascript if you want a solution for the basic 1 word palindrome: https://hellodevworld.com/interview-help/palindrome-interview-question-solution-javascript ****************************************************** ℹ Help Links ℹ typeof: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof toLowerCase: https://www.w3schools.com/jsref/jsref_tolowercase.asp replace: https://www.w3schools.com/jsref/jsref_replace.asp regex: https://regex101.com/ split: https://www.w3schools.com/jsref/jsref_split.asp join: https://www.w3schools.com/jsref/jsref_join.asp reverse: https://www.w3schools.com/jsref/jsref_reverse.asp ternaries: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator Math.floor: https://www.w3schools.com/jsref/jsref_floor.asp for loops: https://www.w3schools.com/js/js_loop_for.asp charAt: https://www.w3schools.com/jsref/jsref_charat.asp ****************************************************** ****************************************************** My Gear: https://kit.co/HelloDevWorld/my-gear Blog: https://hellodevworld.com/ Facebook: https://www.facebook.com/hellodevworl... Dev.to: https://dev.to/hellodevworldblog ****************************************************** DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you!

, чтобы оставлять комментарии