Message from JavaScript discussions

May 2020

— Https://astexplorer.net/

— 

I think it depends on the type of JS ;)
bits of syntax? yes (Use AST Explorer)
a single line? probably ask here
entire program? difficult.

— AST Explorer at least helped me to see _why_ I didn't understand it and what to search for

— That sounds like a debugger

— No debugging, it's more like "I have found code and pasted it into my JS and it works. But now I want to understand what the code actually does"

Message permanent page

— You mean like this ^?

— You Have To Do Yourself Understand Code With Your Skills... Suggestion Breakdown Code Then Try To Understand..

Message permanent page

— This_is_a_snake_case_typing butCamelCaseIsAlsoAThing, ALLCAPSAREGENERALLYPROHIBITED, But What The Heck Is This Crap (buggy phone?) oh-i-forgot-about-this-hyphen-case AndObjectConstuctorCase.

Message permanent page

— Lets maybe make some petition to the famous author from the public? Like we sign a letter to D.Crockford and ask him to make some youtube video where he describes his vision of the JS and stuff🤨

Message permanent page

— Https://www.hackerrank.com/challenges/best-divisor/problem

— Function find(n)
{
let m;
let sum=0;
while(n!=0)
{
m=n%10;
sum+=m;
n=Math.floor(n/10);
}
return sum;
}

function main() {
let largest=[];
const n = parseInt(readLine(), 10);
for(let i=1;i<=n;i++)
{
if(n%i==0)
largest.push(find(i));
}
console.log(Math.max(...largest));
}

Message permanent page

— Why only 14/25 test case is matching