Discover the different methods for writing JavaScript code, including traditional and modern syntax, to enhance your coding flexibility.