Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 only the second picture JS File Naming Convention - Multiple Answer. A JavaScript file named validationUtils.js has the following contents: var validationutils = 0);
2
only the second picture
JS File Naming Convention - Multiple Answer. A JavaScript file named "validationUtils.js" has the following contents: var validationutils = 0); validationutils.validatedals - function ( console.log('validatedate just ran'); }; validationutils.validateInteger = function () { console.log('validateInteger just ran'); }; Select all the responses that are true. This JavaScript file does not follow the JS Naming Convention (outlined in our lecture material) because you are not supposed to put more than one function in an external JS file. This JavaScript file follows the JS Naming Convention outlined in our lecture material. Suppose an HTML page had a reference to this external file.JS code in the HTML page would not be able to reference the functions defined in the US file leg., validation Utils.validateDate) because they would be out of scope. The JS Naming Convention (outlined in our lecture material) is designed to help you (and others) locate functions that have been defined in external US files. The JS Naming Convention (outlined in our lecture material) is designed to minimize the number of globally defined functions and objects which is important, especially when multiple programmers are contributing to a large web application 4 pts Question 20 JS File Naming Convention2 - Multiple Answer. A JavaScript file named "validate.js" has the following contents: function validatedate() console.log('validatedate just ran"); var validateInteger = function () { console.log("validateInteger just ran'); 3: Select all the responses that are true. This JavaScript file does not follow the JS Naming Convention (outlined in our lecture material) because the file is supposed to only contain a single function or object named the same as the file. Code like this is problematic leven though it will run without error and even though things are named reasonbly well) because when you see a reference to one of these functions (validateDate or validatelngeter), you'll have to guess which JS file the function is in m Code like this is not well designed because it declares more global functions than it needs to. It is important not to "pollute the global namespace" especially when working on large projects in a programming team Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started