python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to find a string with specific letters in gethash javascript function
function getHash( string ) {
let h = 7, letters = "acdefhlmnoprstuw";
for( var i = 0; i < string.length; i++ ) {
h = ( h * 37 + letters.indexOf( string[ i ] ) );
}...
Vkx
Votes: 0
Answers: 1
How to print list of all class instances with their values instead of location in memory?
I met that problem before while studying the OOP and lack experience for sure. Surfed through a lot of stackoverflow pages but somehow all suggestions do not help. Please, refer me to the appropriate ...
Stanislau Yarmaliuk
Votes: 0
Answers: 0
Why can't return be expressed in one line when using a Switch Expression?
while (true) {
console.mainMenu();
String inputCommand = console.input();
switch(inputCommand) {
case "exit" -> return;
case "create" -> {
...
yongc
Votes: 0
Answers: 1
Node.Js: Async return gives undefined
I'm trying to make a function which returns the user's balance. However, the function returns undefined. I've checked all the solutions on stackoverflow but I wasn't able to find a solution.
Return fu...
gx.
Votes: 0
Answers: 1