Skip to content

Instantly share code, notes, and snippets.

View saloni-jain484's full-sized avatar
🏠
Working from home

Saloni Jain saloni-jain484

🏠
Working from home
  • @tata Consultancy Services
  • Greater Noida
View GitHub Profile
@saloni-jain484
saloni-jain484 / Day -2 JavaScript Practice
Last active May 11, 2024 11:58
Hacker Rank - 10 Days of JavaScript Practice
Task
Complete the vowelsAndConsonants function in the editor below. It has one parameter, a string, , consisting of lowercase English alphabetic letters (i.e., a through z). The function must do the following:
First, print each vowel in on a new line. The English vowels are a, e, i, o, and u, and each vowel must be printed in the same order as it appeared in .
Second, print each consonant (i.e., non-vowel) in on a new line in the same order as it appeared in string.
Solution
function vowelsAndConsonants(s) {
@saloni-jain484
saloni-jain484 / Day -0
Created May 14, 2020 10:20
Hacker Rank - 10 Days of Javascript
Objective
In this challenge, we review some basic concepts that will get you started with this series. Check out the tutorial to learn more about JavaScript's lexical structure.
Task
A greeting function is provided for you in the editor below. It has one parameter, . Perform the following tasks to complete this challenge:
Use console.log() to print Hello, World! on a new line in the console, which is also known as stdout or standard output. The code for this portion of the task is already provided in the editor.
Use console.log() to print the contents of (i.e., the argument passed to main).