Solve this problem & Join Scrimba's #Javascriptmas challenge! They're giving away a M3 Macbook Air, and so much more!! View my solution: scrimba.com/exercise-s0rpi92og7?via=AnthonySistilli Join the challenge: scrimba.com/javascriptmas-c0javascriptmas?via=AnthonySistilli
use replace with a function as argument, i create a new object for the replacement mapping: function emojifyWord(word) { return (emojiMapping[word] ?? word.replace(/^:([a-z_]+):$/, (match, p1) => hackedEmojis[p1] ?? word)); } function emojifyPhrase(phrase) { return phrase.replace(/([^\s]+)/g, (match, p1) => emojifyWord(p1)); }
Question can't javascript compare 😊 === 😊? Because technically we can just technically compare values from the hackedEmojis. Another way maybe is to compare Ascii if they have. Or am I wrong?
@@met-lh6sz ai isnt going to be able to reason/use logic in 10 years.(currently ai works by predicting the next word in its response via probability) If it somehow does then every job will be screwed and you'll probably end up dying to a robot.
No man, tested AI with a problem that isn't exactly easy but isn't the most difficult either. Just requires some lateral thinking. On leetcode the problem is: 1861. Rotating the Box. It failed miserably. I kept telling the AI that the output was wrong, I changed parameters, I wrote everything out more specifically, but it kept spitting out the same old crappy block of code that didn't do anything to actually solve the problem. I agree with @AgoingFar. It can't reason. Its like it regurgitates blocks of code that someone, somewhere else inputted without any idea how it actually works.
Solve this problem & Join Scrimba's #Javascriptmas challenge! They're giving away a M3 Macbook Air, and so much more!!
View my solution: scrimba.com/exercise-s0rpi92og7?via=AnthonySistilli
Join the challenge:
scrimba.com/javascriptmas-c0javascriptmas?via=AnthonySistilli
the investment put in this video is huge (christmas hat costs $5) 😱😱😱😱
Congrats on 100k! I have been watching since one of the first portfolio reviews. Road to 200k
use replace with a function as argument, i create a new object for the replacement mapping:
function emojifyWord(word) {
return (emojiMapping[word] ??
word.replace(/^:([a-z_]+):$/, (match, p1) => hackedEmojis[p1] ?? word));
}
function emojifyPhrase(phrase) {
return phrase.replace(/([^\s]+)/g, (match, p1) => emojifyWord(p1));
}
Btw, I love how you mock scrum masters in your video.
Bro Is So Close To a 100k
Well... if the phrase includes some double spaces between words this is not working (it will remove the extra spaces also) right?
Question can't javascript compare 😊 === 😊?
Because technically we can just technically compare values from the hackedEmojis.
Another way maybe is to compare Ascii if they have.
Or am I wrong?
hey bro, do you think AI will replace programmers in the next years? bc im not sure if i should get a degree
Try to setup an amplify gen2 app with chat-gpt, it will answer your question
@moritz6526 think of ai in the next 10 years
@@met-lh6sz ai isnt going to be able to reason/use logic in 10 years.(currently ai works by predicting the next word in its response via probability) If it somehow does then every job will be screwed and you'll probably end up dying to a robot.
No man, tested AI with a problem that isn't exactly easy but isn't the most difficult either. Just requires some lateral thinking. On leetcode the problem is: 1861. Rotating the Box.
It failed miserably. I kept telling the AI that the output was wrong, I changed parameters, I wrote everything out more specifically, but it kept spitting out the same old crappy block of code that didn't do anything to actually solve the problem. I agree with @AgoingFar. It can't reason. Its like it regurgitates blocks of code that someone, somewhere else inputted without any idea how it actually works.