i have written random function to set some string values in accountname and this is in utilities/random.js. when I try calling this function in my test/sample.js this function is not setting the value of account name
random function
export const randomString = (n) => {
let str = 'abcdefghijklmnopqrstuvwxyz9876543210';
let tmp = '',
i = 0,
l = str.length;
for (i = 0; i < n; i++){
tmp += str.charAt(Math.floor(Math.random() * l));
}
return tmp;
}
calling it in test/sample.js
import { randomNum, randomString } from '../utils/random';
let accountname = randomString(length);