Suggestion is needed

hy i am very new.I start js what i should i learn next ?(which frame work)
I tried problem solving in hacker rank using js, I found the the given syntax is different.or I am not learning properly?
Thanks in Advance…

Do you have an example of what you mean by different?

Before learning a framework, I strongly suggest learning the basics of JavaScript first. Our curriculum here does pretty good job of teaching most of the basics you will need before trying to incorporate frameworks into the mix. The frameworks are still written in JavaScript, so without the basic knowledge, you will struggle learning many of the concepts used in the various JavaScript frameworks and libraries.

1 Like

Thank you ,yes now i am learning js ,here’s the hacker rank code:
‘use strict’;

const fs = require('fs');

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(str => str.trim());

    main();
});

function readLine() {
    return inputString[currentLine++];
}

/*
 * Complete the simpleArraySum function below.
 */
function simpleArraySum(ar) {
    /*
     * Write your code here.
     */

}

function main() {
    const ws = fs.createWriteStream(process.env.OUTPUT_PATH);

    const arCount = parseInt(readLine(), 10);

    const ar = readLine().split(' ').map(arTemp => parseInt(arTemp, 10));

    let result = simpleArraySum(ar);

    ws.write(result + "\n");

    ws.end();
}

i will google for every line that i don’t understand but yet it’s so different from what i am learning…
Thank you for your response

The part above is the only thing you should be worrying about. The rest is some more advanced file system methods which read/write information for the particular problem.

The code you would write for the function above would be the same basic JavaScript you would learn here or other places.

1 Like