{"id":3756,"date":"2023-03-01T22:24:21","date_gmt":"2023-03-02T03:24:21","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/?p=3756"},"modified":"2023-03-01T22:25:06","modified_gmt":"2023-03-02T03:25:06","slug":"discussion-5a-javascript-variables","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/2023\/03\/01\/discussion-5a-javascript-variables\/","title":{"rendered":"Discussion 5a JavaScript Variables"},"content":{"rendered":"<p>Hello everyone,<\/p>\n<p>JavaScript can be a little confusing when you first start learning how to use it, one of the first things that is important to learn about is Variables. We use variables as names for different containers with different locations within a code. To begin using a variable you want to start by tying \u201cvar myText &#8221; into your coding program, throughout this semester in MIS we used Visual Studio Code (VSC) but there are different coding programs available. When you type \u201cvar myText\u201d you are creating a container that you can fill with anything you want. For this example, I will be assigning myText as \u201cGood luck, everyone!\u201d In VSC if I wanted to have my text pop on to screen, I create it as an alert. It this will look something like this,\u00a0<\/p>\n<p>&gt;script&gt;<\/p>\n<p>\u00a0\u00a0var myText =\u00a0 \u201cGood luck, everyone!\u201d<\/p>\n<p>\u00a0\u00a0alert(myText);<\/p>\n<p>&lt;\/script&gt;<\/p>\n<p>That means when I run the program the words \u201cGood luck, everyone!\u201d will pop on screen as a notification. The text can be anything you want it to be, and it can be used multiple times throughout your code. This is important to know because you do not want to continue repairing certain lines of code. One question that always comes up when talking about naming variables is, is there a specific way we must name them? The answer is yes, JavaScript is lenient about how you name your containers but there are still rules that need to be followed. Variables must never start with a number, they can start with different symbols like underscores, or dollar signs, as well as uppercase and lowercase letters. You must also remember that you cannot have any spaces between names of variables. These are just some of the rules you must follow when naming variables.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone, JavaScript can be a little confusing when you first start learning how to use it, one of the first things that is important to learn about is Variables. We use variables as names for different containers with different locations within a code. To begin using a variable you want to start by tying [&hellip;]<\/p>\n","protected":false},"author":29447,"featured_media":3467,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[10531],"tags":[845005,844996],"class_list":{"0":"post-3756","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-student-post","8":"tag-javascript","9":"tag-variables","10":"entry"},"jetpack_featured_media_url":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/files\/2023\/02\/variables.png","_links":{"self":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/users\/29447"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/comments?post=3756"}],"version-history":[{"count":1,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3756\/revisions"}],"predecessor-version":[{"id":3777,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/posts\/3756\/revisions\/3777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/media\/3467"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/media?parent=3756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/categories?post=3756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec730spring2023\/wp-json\/wp\/v2\/tags?post=3756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}