hugolee0003 Coderslang_Master
The function createSamples should take a string and return another string. The returned string should be formed as described in the task description.
The comments here show the expected output.
console.log(createSamples('binGO')); // bingoBINGO
console.log(createSamples('R2D2')); // r2d2R2D2
Both of the consoles should print in lowercase and uppercase( For example bingoBINGO).
The tricky part is here, that there is a slight change in the helper.js file.
Previously in the helper.js file,
const toLowerCase = (s) => {
return s.toLowerCase();
}
const toUpperCase = (s) => {
return s.toUpperCase();
}
export const createSamples = (s) => {
return s;
}
//solution.js
import { createSamples } from './helper.js';
console.log(createSamples('binGO'));
console.log(createSamples('R2D2'));
Output:
binGO
R2D2
The main part comes here from the change I made in the helper.js file as the output expected.
Updated:
const toLowerCase = (s) => {
return s.toLowerCase();
}
const toUpperCase = (s) => {
return s.toUpperCase();
}
export const createSamples = (s) => {
return s.toLowerCase() + s.toUpperCase();
}
//solution.js
import { createSamples } from './helper.js';
console.log(createSamples('binGO'));
console.log(createSamples('R2D2'));
The Expected Output:
bingoBINGO
r2d2R2D2
So, here is the process which I have done.