javascript-challenges-book

Terminator

Here you have the prototype code of the next Terminator fan page:



    
        Terminator Fan Page
    
    
        

One of my colleagues has written the next code that will log the name we send using the form in the previous page.


But then someone sends the next message as a name and the behaviour of the page changes...

'

Here is an example of executing the page with the bug:



    
    
        
    

Exercise
Correct!
False!
Fix the code:
var result = ''; function sayonara( name ) { result = 'Sayonara ' + name + '!'; } sayonara( '