Open NazgulM opened 2 years ago
function removeExclamationMarks(s) {
let newString = s.split("");
for (let i = 0; i < newString.length; i++) {
newString[i] = newString[i].replace('!', '');
}
return newString.join('');
}
describe("Tests", () => { it("test if the string has ! marks", () => { expect(removeExclamationMarks("Hello World!").toEqual("Hello World")); }); });
## What went well?
- I like Edabit exercises, can create and solve them, codewars more harder for me.
- Successfully tested array add functions
## Lessons Learned
- Very important to learn how to use tests
## Sunday Prep Work
- Continue doing exercises
function removeExclamationMarks(s) { let newString = s.split(""); for (let i = 0; i < newString.length; i++) { newString[i] = newString[i].replace('!', ''); } return newString.join(''); }
describe("Tests", () => { it("test if the string has ! marks", () => { expect(removeExclamationMarks("Hello World!").toEqual("Hello World")); }); });
be careful with the brackets.. the correct way to write it in this case would be:
function removeExclamationMarks(s) {
const newString = s.split('');
for (let i = 0; i < newString.length; i++) {
newString[i] = newString[i].replace('!', '');
}
return newString.join('');
}
describe('Tests', () => {
it('test if the string has ! marks', () => {
expect(removeExclamationMarks('Hello World!')).toEqual('Hello World');
});
});
expect(someFunction(arg1, arg2)).toEqual('something')
expect(someFunction(arg1, arg2)).toEqual('something')
Thank you Daniel, now more clear.
function removeExclamationMarks(s) { let newString = s.split(""); for (let i = 0; i < newString.length; i++) { newString[i] = newString[i].replace('!', ''); } return newString.join(''); }
describe("Tests", () => { it("test if the string has ! marks", () => { expect(removeExclamationMarks("Hello World!").toEqual("Hello World")); }); });
be careful with your brackets 🙂
describe("Tests", () => {
it("remove ! from end of string", () => {
expect(removeExclamationMarks("Hello World!")).toEqual("Hello World");
});
});
function removeExclamationMarks(s) { let newString = s.split(""); for (let i = 0; i < newString.length; i++) { newString[i] = newString[i].replace('!', ''); } return newString.join(''); } describe("Tests", () => { it("test if the string has ! marks", () => { expect(removeExclamationMarks("Hello World!").toEqual("Hello World")); }); });
be careful with your brackets 🙂
describe("Tests", () => { it("remove ! from end of string", () => { expect(removeExclamationMarks("Hello World!")).toEqual("Hello World"); }); });
Sorry Daniel, first week message doubled, thank you
nice work Nazgul, glad to hear it went so well this week! let me know if we can help somehow. were there any linting issues or conflicts between ESLint and Prettier?
nice work Nazgul, glad to hear it went so well this week! let me know if we can help somehow. were there any linting issues or conflicts between ESLint and Prettier?
Thank you Daniel, with these exercises I hadn't issues with Prettier
Learning Objectives
Priorities: 🥚, 🐣, 🐥, 🐔 (click to learn more)
There is a lot to learn in this repository. If you can't master all the material at once, that's expected! Anything you don't master now will always be waiting for you to review when you need it. These 4 emoji's will help you prioritize your study time and to measure your progress: - 🥚: Understanding this material is required, it covers the base skills you'll need to move on. You do not need to finish all of them but should feel comfortable that you could with enough time. - 🐣: You have started all of these exercises and feel you could complete them all if you just had more time. It may not be easy for you but with effort you can make it through. - 🐥: You have studied the examples and started some exercises if you had time. You should have a big-picture understanding of these concepts/skills, but may not be confident completing the exercises. - 🐔: These concepts or skills are not necessary but are related to this module. If you are finished with 🥚, 🐣 and 🐥 you can use the 🐔 exercises to push yourself without getting distracted from the module's main objectives. ---
1. Remix
Practice studying and remixing other people's solutions to coding challenges. Create your own solutions by mixing and matching pieces from other people's code.
2. Write
3. Review