This is my first experience with Javascript, but I have worked with C, and Kotlin programming languages. The first big difference in Javascript that I noticed from C is that I no longer needed variable type declarations. Instead Javascript uses declarations such as const, var, and let. These declarations work with characters, integers, and floating point values interchangeably. This is a very nice change as typing int, float, and char before every variable declaration can be very tedious.
Another difference is that functions are treated as “first-class citizens” meaning they can be assigned to variables, passed as arguments to other functions, returned by other functions, and stored in arrays. To sum it up simply, functions can be treated like variables or data values. Being able to pass functions as arguments to other functions and returning functions from other functions makes it easier to create higher order functions. I observed how in a single line of code, two functions were able to execute and return their respective outputs to the parameter field of a third function. The third function was then able to return a final value using the two function outputs as parameters. This may seem mundane to many but I got a little excited when seeing how I could condense my code and keep things very compact and readable.
Javscript is also much easier to use with objects than C is. Previously in C I would need to declare structs and use pointers to check if an object owns a specific property. In Javascript I can just use the hasOwnProperty() function to do this check.
There are also a lot of other convenient differences, such as not having to allocate memory for an array manually. I am sure that I have much more to learn about Javascript but so far it seems much more compact and adaptable. It feels like I do not have to worry about as many small details as I did before when programming in C. It will still be important to understand how everything works under the hood when problems arise, but it seems Javascript can keep code manageable and easy to understand.