Great job today! Loved the collaborative and curious minds of today’s lesson! I hope you will continue bring all of this energies during your awesome learning journey!
Quick reminder about homework for the next session!
Tomorrow we’ll start with our last project Building A Cash Register , so your homework is to finish the intermediate algorithm section and, if you have time and energies, check the last project before solving it together!
Remember folks, you’re not alone.
Don’t hesitate to seek help in the #js-help channel or on the forum!
Be sure to collaborate, stay hydrated and get plenty of rest!!!
Hi there!
I would really appreciate if you could cover this exercise in the Q and A tomorrow please - I feel I am almost there, but it is not quite coming together, ha ha.
I just need to work out how to automatically substitute the individual letters for their corresponding two letter arrays. Thanks to you or anyone else who can help
And thanks for a fantastic boot camp
function pairElement(str) {
const pairs = {
"G": ["G", "C"],
"C": ["C", "G"],
"A": ["A", "T"],
"T": ["T", "A"]
}
let myRegex = (/G+|C+|A+|T+/g);
let newStr = str.match(myRegex);
console.log(newStr);
let finalStr = newStr;
finalStr.pop();
finalStr.push(pairs["A"]);
finalStr.shift();
finalStr.unshift(pairs["A"]);
// should i be converting the array to a string first?
// access array items using index [0] etc.
let continuedStr = finalStr.join(pairs["T", "A"]);
console.log(continuedStr)
//how do i replace eg. "G" with ["G", "C"] automatically
console.log(finalStr)
//return reallyNewStr
//[newStr.split(newStr).join(pairs)];
}
console.log(pairElement("ATCGA"));
In fact - ha ha ha - while reviewing all the remaining Intermediate Algorithm Scripting Exercises, I think I will be struggling a lot going through this alone - can we go through some more of the exercises in the Q and A tomorrow please? And - will this (tomorrow) be the last ever Q and A? Is there any chance in having a final round up session, e.g. next week?
Not sure if I am being cheeky or not here, as I do appreciate you have already given us so much of your time and expertise. Anyway, I’m asking.
Thanks for everything regardless.