generated from CodeYourFuture/Module-Template
    
        
        - 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 240
 
London | 25-ITP-September | Ammad Ur Rehman | Sprint 1 | 03 Complete Sprint 1 Coursework #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            anosidium
  wants to merge
  19
  commits into
  CodeYourFuture:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
anosidium:coursework/sprint-1
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            19 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      9a1b9a4
              
                Add two new generated files
              
              
                anosidium 18a20f4
              
                Completed 1-count.js exercise
              
              
                anosidium d428922
              
                Completed 2-initials.js exercise
              
              
                anosidium 6a17974
              
                Completed 3-paths.js exercise
              
              
                anosidium 6dbf419
              
                Complete 4-random.js exercise
              
              
                anosidium c43a664
              
                Completed 0.js exercise
              
              
                anosidium 56a3e38
              
                Completed 1.js exercise
              
              
                anosidium 88aee46
              
                Completed 2.js exercise
              
              
                anosidium ceae1cf
              
                Completed 3.js exercise
              
              
                anosidium ea93025
              
                Completed 4.js exercise
              
              
                anosidium 1383234
              
                Add comments to explain the errors
              
              
                anosidium 8d02051
              
                Completed 1-percentage-change.js exercise
              
              
                anosidium 26947d3
              
                Completed 2-time-format.js exercise
              
              
                anosidium 8f9c9d3
              
                Completed 3-to-pounds.js exercise
              
              
                anosidium f77fa4d
              
                Completed chrome.md file
              
              
                anosidium 7659c5a
              
                Completed objects.md exercise
              
              
                anosidium a4ffc85
              
                Address the issues from the pull request comments
              
              
                anosidium 3aa28fa
              
                Amend the range explanation using the notation
              
              
                anosidium b4c662e
              
                Address the issues from the pull request comments again
              
              
                anosidium File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "workspace.name" : "Module-Structuring-and-Testing-Data" | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| This is just an instruction for the first activity - but it is just for human consumption | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| // This is just an instruction for the first activity - but it is just for human consumption | ||
| // We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| 
     | 
||
| // By commenting the lines | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| // trying to create an age variable and then reassign the value by 1 | ||
| 
     | 
||
| const age = 33; | ||
| let age = 33; | ||
| age = age + 1; | ||
| 
     | 
||
| // You cannot mutate a constant so you need to change it to a variable where mutation is permitted | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| // Currently trying to print the string "I was born in Bolton" but it isn't working... | ||
| // what's the error ? | ||
| 
     | 
||
| console.log(`I was born in ${cityOfBirth}`); | ||
| const cityOfBirth = "Bolton"; | ||
| console.log(`I was born in ${cityOfBirth}`); | ||
| 
     | 
||
| // The order of the code matters, the constant needs to be defined first before it can be used | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| const cardNumber = 4533787178994213; | ||
| const last4Digits = cardNumber.slice(-4); | ||
| const last4Digits = `${cardNumber}`.slice(-4) | ||
| 
     | 
||
| // The last4Digits variable should store the last 4 digits of cardNumber | ||
| // However, the code isn't working | ||
| // Before running the code, make and explain a prediction about why the code won't work | ||
| // Then run the code and see what error it gives. | ||
| // Consider: Why does it give this error? Is this what I predicted? If not, what's different? | ||
| // Then try updating the expression last4Digits is assigned to, in order to get the correct value | ||
| 
     | 
||
| // slice() function only work on String type and not on Number type. | ||
| // So, convert the Number type into a String type in order to use slice() function | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| const 12HourClockTime = "20:53"; | ||
| const 24hourClockTime = "08:53"; | ||
| const _12HourClockTime = "20:53"; | ||
| const _24hourClockTime = "08:53"; | ||
| 
     | 
||
| // Variables and constants name cannot begin with a number but can include number later on | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -12,7 +12,20 @@ invoke the function `alert` with an input string of `"Hello world!"`; | |
| 
     | 
||
| What effect does calling the `alert` function have? | ||
| 
     | 
||
| It displays an alert saying: | ||
| 
     | 
||
| chrome://new-tab-page says | ||
| 
     | 
||
| Hello world! | ||
| 
     | 
||
| Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`. | ||
| 
     | 
||
| What effect does calling the `prompt` function have? | ||
| 
     | 
||
| It displays an alert with a textfield where you can enter some text, e.g. John. | ||
| 
     | 
||
| What is the return value of `prompt`? | ||
| 
     | 
||
| If the user has entered text, the return value is a string containing the entered text. | ||
| If the user leaves the text field blank and clicks the OK button, the return value is an empty string. | ||
| If the user enters a name or leaves the text field blank but clicks the Cancel button, the return value is null. | ||
| 
         
      Comment on lines
    
      +29
     to 
      +31
    
   
  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is accurate but could be simplified. Some of the info is not very useful. Knowing how to explain or describe code is an important skill in software development. Suggestion: Use AI to help you figure out how to make the description more concise.  | 
||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.