https://github.com/sahapranta/wedevs-que1
https://github.com/sahapranta/wedevs-que1
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sahapranta/wedevs-que1
- Owner: sahapranta
- Created: 2020-10-29T15:01:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-29T15:02:19.000Z (over 4 years ago)
- Last Synced: 2025-02-07T16:43:05.738Z (3 months ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Que: 1
Without using any repetitive statements or any looping constructs (for, while, do-while etc.),
please complete the following function’s body:
```javascript
function customPrint(n, message) {
// Add your code here
}
```**Solution:**
```javascript
function customPrint(n, message) {
if (!n && !message) return;
console.log(Array(n).fill(message).join("\n"));
};// Output
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!
```