Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. N

    (Nodejs) Trying to read a file but not getting the output I expect

    I am learning nodejs and I am just getting my feet wet with it. For practice I am trying to read 2048 bytes from a file then put it in a buffer and repeating until I have read the whole file. In the code I print out 'hello' in the readmyFile function. I do see that repeatedly but I do not...
  2. N

    JavaScript destructuring object fail

    Can i use variable names that do not match the keyword in the object. The only way I can make this work is to use make variable name same as the keyword from the object. I would of thought I could use any variable name. const person ={ firstName: "SpongeBob", lastName: "Square", age...
  3. N

    JavaScript Question about accessing array and arrow function with parameter as an argument to another function

    Hello, Another JS beginner here.I have a couple of questions. #1 Wondering how the arrow function accesses the two elements of the array in getUsers() as it is not clear to me. #2 In function findUser the arrow function that is passed has a argument of users. It is used as an array variable in...
  4. N

    JavaScript Can not figure out how streaming works

    I am trying to figure out how the browser code is controlling the streaming of images from my server . I am fairly new to web technologies, markup languages and javascript. I am streaming images from a camera to a browser. To start the stream the user presses a button which executes javascript...
  5. N

    JavaScript function run without being called

    I am new to javascript and having a problem with some code. It seems to me some of my functions are running even when not called. The page loads and DOMContentLoaded event fires which is expected. DOMContentLoaded event calls getRandomNumber which is also expected. I enter a guess of the...
  6. N

    JavaScript Using attribute methods

    I am trying to get a handle on html, css and javascript. One thing i ran into was using DOM and using the attribute methods element.getAttribute(name) – get the attribute value element.setAttribute(name, value) – set the value for the attribute element.hasAttribute(name) – check for the...
  7. N

    JavaScript code breaks when I use a variable

    Using a webpage to control leds connected to a microcontroller. Just using a variable to substitute for document.getElementById('ID_LED_0') EDIT: Also get err in console: DevTools failed to load source map: Could not load content for...
Back
Top Bottom